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