Denis Isaev
6508d1623a
fix #513 : don't add gofmt "with -s" if not needed
...
Output
File is not `gofmt`-ed
insted of
File is not `gofmt`-ed with `-s`
when gofmt.simplify == false
2019-06-09 16:22:41 +03:00
Sonia Hamilton
5c86bfc905
junit-xml output
2019-06-09 13:23:17 +03:00
Denis Isaev
7f91ce8067
fix conflict in go.mod after merging #555
2019-06-09 13:22:03 +03:00
Isaev Denis
88318cb0e2
Merge pull request #555 from LukeShu/lukeshu/reproduce
...
Makefile: Make it easier to re-generate everything
2019-06-09 13:19:28 +03:00
Isaev Denis
66d4a16c6a
Merge branch 'master' into lukeshu/reproduce
2019-06-09 13:18:41 +03:00
Harsimran Kaur
88af7095c1
Typo GOCC to GOGC
2019-06-09 13:12:27 +03:00
Denis Isaev
9d8eb16395
fix after #533 : fix comment and goimports
2019-06-09 13:08:46 +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
Alexey Palazhchenko
778888a6f5
Make install script work on Windows.
...
Closes #472 .
2019-06-09 13:01:30 +03:00
Tariq Ibrahim
e925b8f1ea
update golangci version references in the documentation
2019-06-09 13:00:02 +03:00
Luke Shumaker
2508856219
Makefile: Be clear about exactly which files are generated, and how
...
This mostly aims to document how everything was generated, and the steps
necessary to re-generate the same files verbatim; the goal is to figure
out how to reproduce the files as they currently are. The exception is
that we strip out the timestamp out of install.sh.
2019-06-05 01:04:00 -04:00
Luke Shumaker
d7a38bbdf2
go.mod: Roll back to golang/mock 1.0.0
2019-06-05 00:58:57 -04:00
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