170 Commits

Author SHA1 Message Date
Trevor Pounds
92168d033d Add dogsled linter. (#705) 2019-09-17 08:44:53 +03:00
Isaev Denis
6a979fb40d
Update staticcheck and cache go/analysis facts (#699)
* update staticcheck

Don't fork staticcheck: use the upstream version.
Remove unneeded SSA loading.

* Cache go/analysis facts

Don't load unneeded packages for go/analysis.
Repeated run of go/analysis linters now 10x faster
(2s vs 20s on this repo) than before.
2019-09-17 08:42:16 +03:00
Aleksandr Razumov
f3f5dfc3eb govet: implement analyzers config (#697) 2019-09-16 00:15:08 +03:00
Will Dixon
9161de5b7d Upgrade depguard to fix performance issue with go modules (#698)
* Upgrade depguard to fix performance issue with go modules

* Fix linting error of unused function
2019-09-15 14:13:16 +03:00
Denis Isaev
4ffe85cae8
docs: update changelog 2019-09-14 14:15:27 +03:00
Matouš Dzivjak
58845813da linters: add Godox linter support (#621)
Godox is linter for TODOs and FIXMEs left in the code.

Signed-off-by: Matous Dzivjak <matous.dzivjak@kiwi.com>
2019-09-11 16:53:40 +03:00
Isaev Denis
f1c1dbfab4
Feature/enable autofix on whitespace (#674)
The whitespace linter was added in #673. Enable it and fix found issues.
Add auto-fixing to the whitespace linter.
2019-09-10 16:56:44 +03:00
NiseVoid
c7dee2c0b2 Add whitespace linter (#673) 2019-09-10 13:25:01 +03:00
Denis Isaev
5fb91e6434
docs: document bash completion in README
Also, change command `golangci-lint completion`
  to `golangci-lint completion bash`.
2019-09-10 12:06:10 +03:00
Fei Xu
4ed1349a6b add kubeedge (#636) 2019-09-10 11:25:26 +03:00
Denis Isaev
bad04bb737
dev: regenerate README.md after #630
Also, output help for the new option in a more compact way.
2019-09-10 11:17:18 +03:00
Isaev Denis
c87c37210f
dev: update install.sh (#672) 2019-09-10 11:09:39 +03:00
Isaev Denis
6163a8a790
Support go1.13 (#670)
Setup Travis CI to run on go 1.12 and 1.13.
Update info about go versions in README.
Rebuild go.mod,go.sum on go1.13.
2019-09-09 21:54:56 +03:00
Cody Ley-Han
a8f2c27d1d Add user supplied error messages in depguard issues (#662) 2019-09-09 20:46:55 +03:00
Matthew Poer
a02e3f573b Updates README with additional nolint notes (#644)
Fixes #642
2019-09-09 20:43:21 +03:00
Isaev Denis
6864b2f764
dev: enable funlen on repo (#668) 2019-09-09 18:07:09 +03:00
NiseVoid
bb82273160 Add funlen linter (#603) 2019-09-09 16:56:30 +03:00
Denis Isaev
e39e8fb5d5 update x/tools
Significantly improve CPU and memory usage when not using SSA-powered linters.
Improve readability of go/packages errors.
Improve debugging capabilities and write doc about debugging.
2019-09-09 15:04:32 +03:00
Denis Isaev
3d954ea19d docs: s/v1.17.0/v1.17.1 2019-06-11 15:39:50 +03:00
Denis Isaev
c92a7a30ae docs: s/1.16/1.17 2019-06-10 10:36:04 +03:00
Trevor Pounds
d7ea266760 Fix minor grammatical error. Fixes #556. 2019-06-10 09:24:30 +03:00
Denis Isaev
15858c2fb0
docs: update changelog 2019-06-10 00:22:58 +03:00
Denis Isaev
7db400b2d2 fix #521: explain //nolint usage in README
Also, add more tests for block-wise
usage of //nolint.
2019-06-09 17:27:42 +03:00
Sonia Hamilton
5c86bfc905 junit-xml output 2019-06-09 13:23:17 +03:00
Harsimran Kaur
88af7095c1 Typo GOCC to GOGC 2019-06-09 13:12:27 +03:00
Gianguido Sorà
78079be927 Re-generate README.md due to description change 2019-06-09 13:04:30 +03:00
Gianguido Sorà
72e137e344 Added "bodyclose" support
This commit adds full support for bodyclose linter
(https://github.com/timakin/bodyclose), which checks if an `http.Body`
element is correctly closed after usage.

Since it can be used via `go/analysis', I followed the `govet' example
as suggested by https://github.com/golangci/golangci-lint/wiki/How-to-add-a-custom-linter.

This commit is fully tested, and contains a (flawed) test program which
calls `http.Get()' on `https://google.com' and does not closes its
corresponding `http.Body'.
2019-06-09 13:04:30 +03:00
Tariq Ibrahim
e925b8f1ea update golangci version references in the documentation 2019-06-09 13:00:02 +03:00
Denis Isaev
692dacb773 Update go-critic
New checkers were added:
  - badCall
  - dupImports
  - evalOrder
  - newDeref

The following checkers were fixed/improved:
  - assignOp
  - caseOrder
  - commentedOutCode
  - deprecatedComment
  - dupArg
  - rangeValCopy
  - typeSwitchVar
  - wrapperFunc

Relates: #429
2019-04-25 16:59:23 +03:00
Denis Isaev
eed661be57
docs: update golangci-lint version in README example 2019-04-20 13:23:17 +03:00
Vladimir Evgrafov
a871320784 Regenerate README.md 2019-04-20 13:15:49 +03:00
Denis Isaev
97ea1cbb21
docs: march updates 2019-03-31 22:37:05 +03:00
Denis Isaev
396a04630d dev: improve memory tracking 2019-03-31 22:33:18 +03:00
Denis Isaev
9ce2182d05
docs: update vim-go info 2019-03-31 19:47:32 +03:00
Denis Isaev
f516771a92 Fix #415: sort linters list in help commands 2019-03-18 08:46:13 +03:00
Denis Isaev
85dec0c61b
docs: march updates 2019-03-17 23:17:49 +03:00
Denis Isaev
8c1237b667 Use the newest go vet
The newest go vet based on go/analysis
2019-03-17 23:12:44 +03:00
Rodrigo Brito
099f2ae41a Include log level option 2019-03-17 23:06:27 +03:00
Denis Isaev
22c0580cc7
docs: update march changes 2019-03-17 15:32:55 +03:00
Ben Paxton
f13d8387d3 fix help generation; update README 2019-03-17 15:27:45 +03:00
Denis Isaev
cfff8fd30a
docs: march updates 2019-03-17 15:22:43 +03:00
Denis Isaev
3d2dfac47e Support excluding issues by source line regexp
See issues.exclude-rules[i].source.
Also introduced file data and file lines cache.
2019-03-17 15:17:29 +03:00
Denis Isaev
be0679ee71 build on go 1.12 and fix go 1.11 compatibility 2019-03-05 21:34:53 +03:00
Denis Isaev
d3bc69dc5b docs: update changelog 2019-02-18 11:35:25 +03:00
Denis Isaev
96af958205 fix #383: eval symlinks in AST cache 2019-02-18 00:21:49 +03:00
Denis Isaev
ebadb7a679 Fix #384: support ignore-words option for misspell 2019-02-17 23:47:29 +03:00
Denis Isaev
d437ac8629 Implement auto-fixing for gofmt,goimports,misspell
Also, add more identifier marking patterns.
2019-02-17 20:31:31 +03:00
Viacheslav Poturaev
1eb712544c Add version information to built artifact when go get with go1.12 2019-02-17 19:00:52 +03:00
Denis Isaev
deb63b191f docs: update README after #320 2019-02-17 18:51:34 +03:00
Denis Isaev
b31cfd6c78
update go-critic
$ git cherry --abbrev -v 0af0999fabfb ee9bf5809ead
+ abd8436 all: enable Go modules on CI (#753)
+ 3c9d0fb checkers: recognize //line and //nolint in commentFormatting (#756)
+ 0b517d7 checkers: extend deprecatedComment patterns (#757)
+ 09100f6 checkers: use astcast package instead of coerce.go (#758)
+ 2e9e97f checker: simplify boolExprSimplify (#759)
+ 575701e make: add go-consistent to CI checks list (#761)
+ b55f431 checkers: fix unlambda handling of builtins (#763)
+ 5a7dee3 checker: handle lambdas properly in boolExprSimplify (#765)
+ 5ce3939 checkers: teach boolExprSimplify a few new tricks (#766)
+ 04d160f checkers: add new patterns to boolExprSimplify (#768)
+ 09582e2 make: collect coverprofile separately from goveralls (#769)
+ d8d0ee4 checkers: recognize NOTE pattern in deprecatedComment (#770)
+ 12f0f85 Update copyright notice to 2019 (#771)
+ f54bdb6 checkers: add stringXbytes checker
+ 170d65c checkers: followup for #773 (#774)
+ 84e9e83 checkers: make stringXbytes more linear (#775)
+ a800815 checkers: add Depreacted typo pattern (#776)
+ 6751be9 checkers: add hexLiterals (#772)
+ ac61906 checkers: add typeAssertChain checker (#782)
+ d19dbf1 checkers: add codegenComment checker (#783)
+ d82b576 checkers: proper pkg/obj check for flagName (#786)
+ dfcf754 ci: enable integration tests (#787)
+ 5dafc45 checkers: fix equalFold false positive (#788)
+ ed5e8e7 checkers: refactor and fix hexLiteral checker (#789)
+ e704e07 checkers: add argOrder checker (#790)
+ 34c1dc8 checkers: add Split handling to argOrder checker (#791)
+ cbe095d checkers: add math.Max and math.Min to dupArg (#792)
+ c986ee5 checkers: add checkers info fields test (#794)
+ 66e5832 cmd/makedocs: use lintpack, fix build (#793)
+ 6bce9d0 cmd/makedocs: add enabled/disabled by default info (#795)
+ 4adbf9a checkers: simplify flagName (#799)
+ 07de34a checkers: add octalLiteral checker (#798)
+ 765907a cmd/makedocs: add checker param docs (#796)
+ ee9bf58 cmd/makedocs: fix headers formatting (#803)
2019-02-11 09:35:41 +03:00