11 Commits

Author SHA1 Message Date
Isaev Denis
6237e59c97
dev: use goprintffuncname, gomnd and rowserrcheck ()
Order linters in config in alphabetical order.
Support gomnd configuration.
2020-01-19 19:55:29 +03:00
Trevor Pounds
60c55133a6 Fix import order. 2019-12-30 09:05:39 -05:00
Isaev Denis
48599c64ba
Make fine-grained hashing. ()
Speed up golint: don't typecheck packages twice.
Relates: 
2019-10-14 09:50:57 +03:00
Isaev Denis
9ba730e989
Make incremental analysis ()
Cache linting results. Reanalyze only changed packages
and packages tree depending on them.

Fixes , fixes 
2019-10-13 17:40:51 +03:00
Trevor Pounds
fd997edeeb Cleanup nolint directives. () 2019-10-03 19:34:19 +03:00
Trevor Pounds
6d786b50ae Group imports by package. 2019-10-01 18:09:47 -04:00
Isaev Denis
df4f6766ba
reduce 1.5x memory usage on large repos on repeated runs ()
Get rid of AST cache: load AST when needed. Optimize memory allocations
for go/analysis actions.

Relates: 
2019-10-01 14:52:00 +03:00
Isaev Denis
95ec0cf21e
dramatically reduce memory usage ()
Run all linters per package. It allows unloading package data when it's
processed. It dramatically reduces memory (and CPU because of GC) usage.

Relates: 
2019-09-30 16:19:41 +03:00
Denis Isaev
2fc8b7b788 Drop memory usage of go/analysis linters 5x
Set analysis pass results to nil early to garbage collect them
soon.
Memory can be reduced for the following linters:
  - staticcheck
  - stylecheck
  - gosimple
  - govet
  - bodyclose
  - any future go/analysis linter

Relates: , , , , , , 
2019-09-23 21:58:47 +03:00
Denis Isaev
3aade55e05 Reduce memory usage of go/analysis 2019-09-23 09:52:54 +03:00
Isaev Denis
6a979fb40d
Update staticcheck and cache go/analysis facts ()
* 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