Pull request: all: cleanup
Merge in DNS/adguard-home from cleanup to master Squashed commit of the following: commit a62e28cd35fefe45e228d1762aa2c148204c3065 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Dec 9 12:24:34 2020 +0300 all: more cleanup commit 04dc2220483fa3216b138b7b848b818dcc2a393a Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Dec 8 20:52:28 2020 +0300 all: cleanup
This commit is contained in:
parent
5c7b6bbf5c
commit
ef178610d6
|
@ -11,7 +11,7 @@ fi
|
||||||
found=0
|
found=0
|
||||||
git diff --cached --name-only | grep -q '.go$' && found=1
|
git diff --cached --name-only | grep -q '.go$' && found=1
|
||||||
if [ $found == 1 ]; then
|
if [ $found == 1 ]; then
|
||||||
make lint-go || exit 1
|
make go-lint || exit 1
|
||||||
go test ./... || exit 1
|
go test ./... || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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'
|
|
|
@ -31,14 +31,16 @@ and this project adheres to
|
||||||
|
|
||||||
### Changed
|
### 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
|
- Made the mobileconfig HTTP API more robust and predictable, add parameters and
|
||||||
improve error response ([#2358]).
|
improve error response ([#2358]).
|
||||||
- Improved HTTP requests handling and timeouts ([#2343]).
|
- Improved HTTP requests handling and timeouts ([#2343]).
|
||||||
- Our snap package now uses the `core20` image as its base ([#2306]).
|
- 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
|
[#2231]: https://github.com/AdguardTeam/AdGuardHome/issues/2231
|
||||||
|
[#2267]: https://github.com/AdguardTeam/AdGuardHome/issues/2267
|
||||||
[#2271]: https://github.com/AdguardTeam/AdGuardHome/issues/2271
|
[#2271]: https://github.com/AdguardTeam/AdGuardHome/issues/2271
|
||||||
[#2297]: https://github.com/AdguardTeam/AdGuardHome/issues/2297
|
[#2297]: https://github.com/AdguardTeam/AdGuardHome/issues/2297
|
||||||
[#2306]: https://github.com/AdguardTeam/AdGuardHome/issues/2306
|
[#2306]: https://github.com/AdguardTeam/AdGuardHome/issues/2306
|
||||||
|
|
|
@ -117,8 +117,6 @@ The rules are mostly sorted in the alphabetical order.
|
||||||
|
|
||||||
* Use `gofumpt --extra -s`.
|
* Use `gofumpt --extra -s`.
|
||||||
|
|
||||||
**TODO(a.garipov):** Add to the linters.
|
|
||||||
|
|
||||||
* Write slices of struct like this:
|
* Write slices of struct like this:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
|
Loading…
Reference in New Issue