Luke Shumaker
9ce337296b
Makefile: Set GO111MODULE=on for consistency, adjust tests accordingly
2019-06-05 00:52:23 -04:00
Luke Shumaker
b51d53e11e
make check_generated: Also check vendor/, not just README.md
2019-06-05 00:40:04 -04: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
39f46be460
Fix staticcheck panic on packages that do not compile
...
The bug was introduced in golangci-lint when migrating staticcheck to go/packages.
Also, thanks to pkg.IllTyped we can analyze as max as we can by
staticcheck.
Relates: #418 , #369 , #429 , #489
2019-04-21 11:48:33 +03:00
Aneesh Agrawal
09677d574e
Enable auto-fixing when running via pre-commit
2019-04-21 09:23:19 +03:00
Denis Isaev
ec5bf9b67b
Fix linting of goyacc files
...
Skip yacctab, yaccpar and NONE files.
Relates: #467 , #468
2019-04-20 22:30:48 +03:00
Denis Isaev
ed0b551070
Fix linting of preprocessed files
...
Preprocessed files like .qtpl.go quicktemplate Go files can have
//line directives. They map to a source .qtpl file.
This commit fixes linting of such files:
1. don't fail on AST cache loading
2. output Go filename not .qtpl or similar
Also, here we update golint to the upstream version.
Relates: #316 , #466 , #467 , #468
2019-04-20 21:50:26 +03:00
Denis Isaev
eed661be57
docs: update golangci-lint version in README example
2019-04-20 13:23:17 +03:00
Linus Arver
127f89f072
update golang.org/x/tools
...
This brings in the upstream fix
1aadbdfdbb
. (Upstream
issue is https://github.com/golang/go/issues/31163 ).
To create this commit, I did:
vgo get golang.org/x/tools
make update_deps
cd cmd/golangci-lint
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'"
Fixes #500
2019-04-20 13:20:13 +03:00
Vladimir Evgrafov
a871320784
Regenerate README.md
2019-04-20 13:15:49 +03:00
Vladimir Evgrafov
2f5f082da1
Fix max-issues-per-linter
...
.golangci.example.yml has wrong name for `max-issues-per-linter` variable
2019-04-20 13:15:49 +03:00
Aofei Sheng
cc84f896b6
Correct import path of module sourcegraph/go-diff
2019-04-20 13:12:28 +03:00
John.Koepi
de1d1ad903
make use of LoadAllSyntax compatible with the latest x/tools version
2019-04-02 09:56:13 +03:00
Denis Isaev
97ea1cbb21
docs: march updates
v1.16.0
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
2c69ef2eb0
Update megacheck (staticcheck) to 2019.1.1
...
Relates to #418
2019-03-31 19:41:37 +03:00
Hui Zhu
8319caf63f
Makefile: Add target build
...
kata-containers's ci will re-build and re-install golangci-lint every
time it did the staic check.
So run test of golangci-lint with build will make it slow.
Add target build to make golangci-lint just build but not test.
Fixes : #458
Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-31 19:37:26 +03:00
jumpeiMano
cad10b2a35
Update go version to 1.12 in Dockerfile
2019-03-31 19:35:45 +03:00
Denis Isaev
f516771a92
Fix #415 : sort linters list in help commands
2019-03-18 08:46:13 +03:00
Denis Isaev
fd825488bf
dev: add test for govet custom formatter
2019-03-18 00:31:30 +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
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
Denis Isaev
d278457390
add LICENSE for x/tools
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
Vitaly Isaev
0fdd91dc3d
Update golang.org/x/tools package to fix false IllTyped error
2019-03-17 15:29:58 +03:00
Ben Paxton
f13d8387d3
fix help generation; update README
2019-03-17 15:27:45 +03:00
Ben Paxton
c41b1e2034
Add --color flag to force colored output on/off
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
Trevor Pounds
7514bf8239
Fix AST cache key consistency.
...
Ensures the AST cache always consistently loads/stores
by using the normalized file path as the key.
2019-03-05 21:59:44 +03:00
Denis Isaev
a5c44d2076
go1.11 compatibility fixed
2019-03-05 21:44:52 +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
466006b463
go1.12: migrate from perl GOROOT/test/errcheck
2019-03-05 21:20:43 +03:00
Evgeniy Kulikov
c55a62a8de
Add Go1.12 to TravisCI
2019-03-04 09:49:05 +03:00
Denis Isaev
407c3f0465
go1.12: add nolint for gochecknoinits in mod_version.go
2019-03-04 09:48:45 +03:00
Denis Isaev
d3bc69dc5b
docs: update changelog
2019-02-18 11:35:25 +03:00
Denis Isaev
901cf25e20
dev: add gosec test case
v1.15.0
2019-02-18 11:05:28 +03:00
Denis Isaev
96af958205
fix #383 : eval symlinks in AST cache
2019-02-18 00:21:49 +03:00
Denis Isaev
307c287356
Fix #388 : include staticcheck check name into a message
2019-02-17 23:50:11 +03:00
Denis Isaev
ebadb7a679
Fix #384 : support ignore-words option for misspell
2019-02-17 23:47:29 +03:00
Denis Isaev
193a751f80
dev: improve test for auto-fixing of misspell
2019-02-17 23:34:07 +03:00
Denis Isaev
25a630d206
docker: install golangci-lint into /usr/bin
...
Relates #396
2019-02-17 20:37:45 +03:00
Francisco Souza
f7d2e92011
Dockerfile: copy the binary to /bin/ instead of $GOPATH/bin/
...
Closes #393 .
2019-02-17 20:33:34 +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