21 Commits

Author SHA1 Message Date
David Braley
be3c688da4 I473 (#841)
Support custom linters integration by plugins

Co-authored-by: Isaev Denis <idenx@yandex.com>
2020-01-08 13:51:55 +03:00
Isaev Denis
df4f6766ba
reduce 1.5x memory usage on large repos on repeated runs (#764)
Get rid of AST cache: load AST when needed. Optimize memory allocations
for go/analysis actions.

Relates: #337
2019-10-01 14:52:00 +03:00
Trevor Pounds
a16b4d872b Use stretchr/testify to mock log.
Simplifies test log usage and removes additional
targets and dependencies to go:generate mocks.
2019-09-24 11:58:40 -04:00
Trevor Pounds
2e8d83266f Update dependencies. (#684)
* Update deps.

* Update to Node.js v10.16.3 LTS.

* Fix mock logutils generation.
2019-09-12 16:02:43 +03:00
Isaev Denis
6864b2f764
dev: enable funlen on repo (#668) 2019-09-09 18:07:09 +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
Denis Isaev
8c1237b667 Use the newest go vet
The newest go vet based on go/analysis
2019-03-17 23:12:44 +03:00
Denis Isaev
255a39bcb1 fix #302: fix concurrent astcache access 2018-11-24 09:09:31 +03:00
Denis Isaev
84c9c65f39 fix #243: support Scopelint linter 2018-11-06 08:11:25 +03:00
Denis Isaev
8fceb7fc47
Fix #209: support goimports.local-prefix option for goimports 2018-10-28 18:47:56 +03:00
Denis Isaev
8a478c47ac Prepare for #164: rename GAS to gosec
1. Rename in a backward compatible way
2. Remove gosec default exclude list because gosec is already disabled
by default.
3. Warn about unmatched linter names in //nolint directives
4. Process linter names in //nolint directives in upper case
5. Disable gosec for golangci-lint in .golangci.yml
2018-09-02 09:34:35 +03:00
Denis Isaev
a6b91ccc77 Fix #124: support unparam linter
1. Support unparam linter and fix found issues
2. Replace forked mvdan.cc/lint and mvdan.cc/interfacer with the
upstream ones
3. Minimize forked megacheck: move the most of it's code to this repo
4. Use golang.org/x/tools/go/ssa import path instead of custom fork
paths
5. In golang.org/x/tools/go/{ssa,callgraph} use changed code from
honnef.co/go/tools
6. Add megacheck.check-unexported option: it found some issues in
the repo, fixed them all
2018-06-30 12:24:07 +03:00
Denis Isaev
9fa9e2b3f8 Fix #106: fix transitive expanding of nolint: we could nolint more lines than needed 2018-06-16 10:56:58 +03:00
Denis Isaev
9181ca7175 Fix #78: log all warnings
1. Log all warnings, don't hide none of them
2. Write fatal messages (stop analysis) with error log level
3. Remove ugly timestamp counter from logrus output
4. Print nested module prefix in log
5. Make logger abstraction: no global logging anymore
6. Refactor config reading to config.FileReader struct to avoid passing
logger into every function
7. Replace exit codes hardcoding with constants in exitcodes package
8. Fail test if any warning was logged
9. Fix calculation of relative path if we analyze parent dir ../
10. Move Runner initialization from Executor to NewRunner func
11. Log every AST parsing error
12. Properly print used config file path in verbose mode
13. Print package files if only 1 package is analyzedin verbose mode,
  print not compiling packages in verbose mode
14. Forbid usage of github.com/sirupsen/logrus by DepGuard linter
15. Add default ignore pattern to folint: "comment on exported const"
2018-06-14 23:09:04 +03:00
Denis Isaev
adb6be78bb
Fix #72: match more autogenerated files patterns.
We skip all issues from autogenerated files.
Also reuse AST parsing for nolint and autogenerated exclude processors:
decrease processing time on golang source code from 3s to 800ms.
2018-06-11 00:51:23 +03:00
Denis Isaev
8a9b3a5143
#65, #68: make //nolint processing like in gometalinter 2018-06-06 23:51:15 +03:00
Stephan Renatus
468d2334ea change isGenerated heuristic to match more generated files
As observed in #30, there's tools out there that don't comply 100% with
the referenced golang convention.

With this change, golangci-lint will skip some more of those generated
files.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
2018-05-31 09:15:22 +02:00
golangci
cad9fc7760 #26: fix spaces in nolint directive 2018-05-28 12:19:55 +03:00
golangci
07ddc548dc another group of fixes after running on golang source code 2018-05-08 18:08:28 +03:00
golangci
5dc876c260 pretty printing issues 2018-05-08 11:54:30 +03:00
golangci
4853151835 async issues processing 2018-05-07 21:44:40 +03:00