Oleksandr Redko
1e700732e7
dev: gofmt -w -r 'interface{} -> any' pkg scripts ( #3742 )
2023-03-28 16:22:55 +02:00
Ludovic Fernandez
076f6b911d
fix: improve panic management ( #3710 )
2023-03-19 23:02:16 +01:00
Oleksandr Redko
b673c5c1af
dev: replace pkg/errors with native error wrapping ( #3604 )
...
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-02-22 01:35:43 +01:00
Ludovic Fernandez
3a6f8408b7
go1.20 support ( #3414 )
2023-02-02 09:08:09 +01:00
Ludovic Fernandez
f072d55e6d
dev: add doc about internal package extracted from Go ( #3204 )
2022-09-12 09:19:06 +02:00
Ludovic Fernandez
19a338706a
dev: reference all the debug keys and env vars ( #3196 )
2022-09-06 11:48:25 +00:00
Ludovic Fernandez
1557692e59
feat: go1.19 support ( #3037 )
2022-08-03 20:53:06 +02:00
Sasha Melentyev
a9dc1ce178
dev: change format like function without args ( #3012 )
...
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2022-07-24 18:24:01 +02:00
Ethan Reesor
0abb298136
staticcheck: fix generics ( #2976 )
...
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2022-07-14 04:10:10 +02:00
Ludovic Fernandez
f9d815115c
bump golang.org/x/tools to HEAD ( #2875 )
...
* bump golang.org/x/tools to HEAD
* fix: adapt linters to the new validation system.
2022-05-23 12:39:57 +02:00
dependabot[bot]
f7a66d0193
build(deps): bump github.com/go-critic/go-critic from 0.6.2 to 0.6.3 ( #2759 )
...
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2022-04-11 11:04:10 +02:00
Ludovic Fernandez
8f7f44d175
depguard: reduce requirements ( #2672 )
2022-03-22 00:30:20 +01:00
Oleksandr Redko
99c6516c6b
docs: fix grammar issues in comments ( #2352 )
2021-11-11 05:56:36 +01:00
dependabot[bot]
4ce9a19e7d
build(deps): bump github.com/go-critic/go-critic from 0.5.6 to 0.6.0 ( #2041 )
...
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2021-10-23 00:51:11 +02:00
Ludovic Fernandez
9aea4aee1c
typecheck: display compilation errors as report instead of error ( #1861 )
Extra / Vulnerability scanner (push) Has been cancelled
CI / go-mod (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Release a tag / release (push) Has been cancelled
CI / tests-on-windows (push) Has been cancelled
CI / tests-on-macos (push) Has been cancelled
CI / tests-on-unix (1.14) (push) Has been cancelled
CI / tests-on-unix (1.15) (push) Has been cancelled
CI / tests-on-unix (1.16) (push) Has been cancelled
CI / check_generated (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile.alpine]) (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile]) (push) Has been cancelled
2021-03-25 23:52:55 +01:00
Ludovic Fernandez
2ebc9d7202
dev: clean configuration and code ( #1830 )
2021-03-09 19:46:18 +01:00
Ludovic Fernandez
856ffd16ec
Support RelatedInformation for analysis Diagnostic ( #1773 )
2021-02-24 09:08:17 +01:00
ZhangYunHao
9948153575
DefaultExcludePatterns should only be used for specified linter ( #1494 )
...
Co-authored-by: zhangyunhao <zhangyunhao@bytedance.com>
2020-11-12 15:21:19 +01:00
Nishanth Shanmugham
f3376cab71
add exhaustive linter ( #1166 )
...
* wip
more
add new files
run command fixes
more
* go.mod
* order
* same package
* review comment
* enable linter in .golangci.yml
* add testcase for default-signifies-exhaustive: true
* adjust runGoErrchk instead
* disable the linter
* cleanup
* more cleanup
* cleanup
2020-05-29 16:31:46 +03:00
Isaev Denis
52c9b88c25
reduce mem. usage of unused and update staticcheck ( #1063 )
...
The primary improvement is in early clearing of
analyzed package's TypeInfo, facts, etc for
whole program analyzers (`unused`). Clear it when it
becomes unused and GC collects them early. Initially this
clearing was performed for all analyzers except `unused`.
Update staticcheck from v0.0.1-2019.2.3 to v0.0.1-2020.1.4
Also in this commit:
* speed up loading packages from export data (2.5s -> 2.1s for std)
by not using mutex for export data since it was allowed in
x/tools#07722704da13
* make an order of execution of linters stable
* update renameio and robustio
* use robustio in caching
Relates: #987 , #994 , #995 , #1011
2020-05-03 15:20:17 +03:00
Andrew Shannon Brown
909f628d75
Add linter for nolint
...
Linter can check that nolint statements are properly formatted and also that all
nolint statements are used.
2020-04-26 20:20:17 -07:00
Aleksandr Razumov
e4643439b3
goanalysis: make failed prerequisites
error detailed
...
Print actual error along with dep name.
Ref: #827
2020-03-15 13:47:35 +03:00
Isaev Denis
6237e59c97
dev: use goprintffuncname, gomnd and rowserrcheck ( #927 )
...
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. ( #814 )
...
Speed up golint: don't typecheck packages twice.
Relates: #805
2019-10-14 09:50:57 +03:00
Isaev Denis
6e00f51fc1
Save issues into cache in parallel ( #813 )
...
Fix #810
2019-10-13 20:09:58 +03:00
Isaev Denis
9ba730e989
Make incremental analysis ( #808 )
...
Cache linting results. Reanalyze only changed packages
and packages tree depending on them.
Fixes #768 , fixes #809
2019-10-13 17:40:51 +03:00
Trevor Pounds
fd997edeeb
Cleanup nolint directives. ( #779 )
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 ( #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
Isaev Denis
95ec0cf21e
dramatically reduce memory usage ( #758 )
...
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: #337
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: #712 , #634 , #628 , #598 , #509 , #483 , #337
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 ( #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
Denis Isaev
4495f893b9
Log go/analysis panics, don't crash
...
go/analysis panics were propagated to main and crashed golangci-lint.
Just log them, as with other linters.
Found in #608 .
2019-09-10 18:49:34 +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
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
8c1237b667
Use the newest go vet
...
The newest go vet based on go/analysis
2019-03-17 23:12:44 +03:00
Denis Isaev
7289a90245
modify goanalysis
2019-03-17 23:12:44 +03:00
Denis Isaev
926e99aed0
copy go/analysis internal/checker into the project as is
...
use commit f0bfdbff1f9c986484a9f02fc198b1efcfe76ebe
2019-03-17 23:12:44 +03:00