153 Commits

Author SHA1 Message Date
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
Denis Isaev
b3bad285d0
Fix #382: make go-critic example config valid 2019-02-11 09:33:04 +03:00
Elliot Shepherd
186fe37bf8 add code-climate output format
Just the minimum of the format, to support GitLab CI Code Quality - https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html
2019-02-11 14:26:26 +08:00
Isaev Denis
48bea8b6de Update README.md 2019-02-11 14:22:32 +08:00
Martin Etmajer
aa26b37b6d Add 'segmentio/terraform-docs' to list of great projects. 2019-02-11 14:22:32 +08:00
Denis Isaev
c1085ef5a2
Relates #381, #367: cleanup docs and warn if unparam algo was configured 2019-02-11 08:56:49 +03:00
Denis Isaev
7b2421d551
docs: remove extra bracket 2019-01-26 18:56:51 +03:00
Denis Isaev
e690feb36b
docs: #377: simplify local installation manual 2019-01-26 18:55:29 +03:00
Denis Isaev
41cfba28c5 dev: update goreleaser config and add golangci.com configuration 2019-01-24 12:03:51 +03:00
Denis Isaev
2192097e7f
docs: update changelog 2019-01-21 09:43:37 +03:00
Denis Isaev
8d8ba245e1
docs: update information about Atom integration 2019-01-20 20:48:23 +03:00
Denis Isaev
87aae77943 Update gocritic
Fix #324, relates #314

1. Update gocritic to the latest version
2. Use proper gocritic checkers repo, old repo was archived
3. Get enabled by default gocritic checks in sync with go-critic: don't
enable performance, experimental and opinionated checks by default
4. Support of `enabled-tags` options for gocritic
5. Enable almost all gocritic checks for the project
6. Make rich debugging for gocritic
7. Meticulously validate gocritic checks config
2019-01-09 09:51:48 +03:00
Denis Isaev
7705f82591 Update megacheck to the latest version
Also do following improvements:
  - show proper sublinter name for megacheck sublinters
  - refactor and make more simple and robust megacheck
  merging/optimizing
  - improve handling of unknown linter names in //nolint directives
  - minimize diff of our megacheck version from the upstream,
  https://github.com/golang/go/issues/29612 blocks usage of the upstream
  version
  - support the new `stylecheck` linter
  - improve tests coverage for megacheck and nolint related cases
  - update and use upstream versions of unparam and interfacer instead of forked
  ones
  - don't use golangci/tools repo anymore
  - fix newly found issues after updating linters

Also should be noted that megacheck works much faster and consumes less
memory in the newest release, therefore golangci-lint works noticeably
faster and consumes less memory for large repos.

Relates: #314
2019-01-08 21:16:15 +03:00
Denis Isaev
93b2d10537 docs: make readme after the last README fix 2019-01-08 10:02:12 +03:00
Isaev Denis
21a8185fd2 remove extra --version from README.md 2019-01-08 09:59:24 +03:00
David López
0192cb3955 gocritic: update default checks list
Update gocritic default checks list, add the current gocritic stable checks list
2019-01-08 09:59:24 +03:00
Denis Isaev
658f4addbd
docs: fix errcheck ignore example 2018-12-23 13:03:17 +03:00
Denis Isaev
609de3254c Fix #331: fix errcheck "ignore" config directive.
Make tests for "ignore" and "exclude" directives.
Mark all hidden command-line options as deprecated.
2018-12-23 12:33:41 +03:00