From ef178610d6440ca187f419d844b45d93bad257af Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Wed, 9 Dec 2020 12:39:20 +0300 Subject: [PATCH] Pull request: all: cleanup Merge in DNS/adguard-home from cleanup to master Squashed commit of the following: commit a62e28cd35fefe45e228d1762aa2c148204c3065 Author: Ainar Garipov Date: Wed Dec 9 12:24:34 2020 +0300 all: more cleanup commit 04dc2220483fa3216b138b7b848b818dcc2a393a Author: Ainar Garipov Date: Tue Dec 8 20:52:28 2020 +0300 all: cleanup --- .githooks/pre-commit | 2 +- .golangci.yml | 77 -------------------------------------------- CHANGELOG.md | 6 ++-- HACKING.md | 2 -- 4 files changed, 5 insertions(+), 82 deletions(-) delete mode 100644 .golangci.yml diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 9889db34..b4fb2ee1 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -11,7 +11,7 @@ fi found=0 git diff --cached --name-only | grep -q '.go$' && found=1 if [ $found == 1 ]; then - make lint-go || exit 1 + make go-lint || exit 1 go test ./... || exit 1 fi diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index 19402bd9..00000000 --- a/.golangci.yml +++ /dev/null @@ -1,77 +0,0 @@ -# options for analysis running -'run': - # default concurrency is a available CPU number - 'concurrency': 4 - - # timeout for analysis, e.g. 30s, 5m, default is 1m - 'deadline': '2m' - - # which files to skip: they will be analyzed, but issues from them - # won't be reported. Default value is empty list, but there is - # no need to include all autogenerated files, we confidently recognize - # autogenerated files. If it's not please let us know. - 'skip-files': - - '.*generated.*' - - 'dnsfilter/rule_to_regexp.go' - - 'util/pprof.go' - - '.*_test.go' - - 'client/.*' - - 'build/.*' - - 'dist/.*' - -# all available settings of specific linters -'linters-settings': - 'errcheck': - # [deprecated] comma-separated list of pairs of the form pkg:regex - # the regex is used to ignore names within pkg. (default "fmt:.*"). - # see https://github.com/kisielk/errcheck#the-deprecated-method for details - 'ignore': 'fmt:.*,net:SetReadDeadline,net/http:^Write' - 'gocyclo': - 'min-complexity': 20 - 'lll': - 'line-length': 200 - -'linters': - 'enable': - - 'bodyclose' - - 'deadcode' - - 'depguard' - - 'dupl' - - 'errcheck' - - 'gocyclo' - - 'goimports' - - 'golint' - - 'gosec' - - 'govet' - - 'ineffassign' - - 'misspell' - - 'staticcheck' - - 'stylecheck' - - 'unconvert' - - 'unused' - - 'varcheck' - 'disable-all': true - 'fast': true - -'issues': - # List of regexps of issue texts to exclude, empty list by default. - # But independently from this option we use default exclude patterns, - # it can be disabled by `exclude-use-default: false`. To list all - # excluded by default patterns execute `golangci-lint run --help` - 'exclude': - # structcheck cannot detect usages while they're there - - '.parentalServer. is unused' - - '.safeBrowsingServer. is unused' - # errcheck - - 'Error return value of .s.closeConn. is not checked' - - 'Error return value of ..*.Shutdown.' - # goconst - - 'string .forcesafesearch.google.com. has 3 occurrences' - # gosec: Profiling endpoint is automatically exposed on /debug/pprof - - 'G108' - # gosec: Subprocess launched with function call as argument or cmd arguments - - 'G204' - # gosec: Potential DoS vulnerability via decompression bomb - - 'G110' - # gosec: Expect WriteFile permissions to be 0600 or less - - 'G306' diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b0f7ad..8bf8be89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,14 +31,16 @@ and this project adheres to ### Changed -- Post-updating relaunch possibility is now determined OS-dependently ([#2231], [#2391]). +- Post-updating relaunch possibility is now determined OS-dependently ([#2231], + [#2391]). - Made the mobileconfig HTTP API more robust and predictable, add parameters and improve error response ([#2358]). - Improved HTTP requests handling and timeouts ([#2343]). - Our snap package now uses the `core20` image as its base ([#2306]). -- Various internal improvements ([#2271], [#2297]). +- Various internal improvements ([#2267], [#2271], [#2297]). [#2231]: https://github.com/AdguardTeam/AdGuardHome/issues/2231 +[#2267]: https://github.com/AdguardTeam/AdGuardHome/issues/2267 [#2271]: https://github.com/AdguardTeam/AdGuardHome/issues/2271 [#2297]: https://github.com/AdguardTeam/AdGuardHome/issues/2297 [#2306]: https://github.com/AdguardTeam/AdGuardHome/issues/2306 diff --git a/HACKING.md b/HACKING.md index 77c47eab..4defedcd 100644 --- a/HACKING.md +++ b/HACKING.md @@ -117,8 +117,6 @@ The rules are mostly sorted in the alphabetical order. * Use `gofumpt --extra -s`. - **TODO(a.garipov):** Add to the linters. - * Write slices of struct like this: ```go