243 Commits

Author SHA1 Message Date
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
47440bc2cc don't print config parsing info logs twice 2018-09-02 09:34:35 +03:00
Denis Isaev
a24cc87a06 refactor lintersdb: split it into abstractions 2018-09-02 09:34:35 +03:00
Denis Isaev
c37ad6652e
Fix #206: build golangci-lint on go1.11 v1.10.1 2018-08-27 23:29:13 +03:00
Denis Isaev
ec1208924a add info about Spacemacs to README 2018-08-25 10:35:16 +03:00
Denis Isaev
284447fc07 prettify issue texts 2018-08-18 23:04:27 +03:00
Denis Isaev
e58c27e463 move source code lines extraction to processor and store source lines in output json 2018-08-18 17:27:45 +03:00
Denis Isaev
f81283f38d
get build package from packages.Package for golangci/golangci#12 2018-08-18 11:33:18 +03:00
Denis Isaev
2db694a3ff exit with the code 5 if no go files to analyze 2018-08-17 21:20:54 +03:00
Denis Isaev
a2b901227c Close #196: disable GAS (gosec) by default v1.10 2018-08-12 22:27:04 +03:00
Denis Isaev
faa7599c95 Close #191: fork Misspell and merge 3 pending PR-s into it 2018-08-09 21:30:35 +03:00
Denis Isaev
0262f00bfb Fix #130: update ineffassign: fix crash on break/continue outside of loop 2018-08-09 00:21:21 +03:00
Denis Isaev
b900926bfc Fix #121, fix #186: remove --silent,-s flag: be silent by default 2018-08-08 23:55:01 +03:00
Denis Isaev
9ec959f08e
Close #187: disable typecheck for golangci.com by default 2018-08-08 23:33:45 +03:00
Romanos Skiadas
d3eb3ed74d point users to --new-from-rev=HEAD~ for CI setups in --help
Although the FAQ does eventually mention that
--new-from-rev=origin/master is the right way, --help does not and
using --new in CI is a terrible pitfall.

Make --help point users to -new-from-rev=HEAD~ for CI setups.

Also use HEAD~ instead of origin/master, since HEAD~ is more
universally applicable, e.g. if golangci-lint is ran against a release
branch.
2018-08-08 20:06:49 +03:00
Will Dixon
a2450a5281 Path Prefix was broken on depguard 2018-08-06 23:42:57 +03:00
Will Dixon
1f3d5b2e42 Update depguard with Glob matching support 2018-08-04 09:28:17 +03:00
Fabrice Rabaute
bc945a157b Improve lll parsing for very long lines
lll is using scanner.Scan() to read the file line by line.
scanner.Scan() might fail if the line is longer than bufio.MaxScanTokenSize
In the case where the specified maxLineLen is smaller than bufio.MaxScanTokenSize
we can return this line as a long line instead of returning an error.
The reason for this change is that this case might happen with autogenerated files
The go-bindata tool for instance might generate a file with a very long line.
In this case, as it's a auto generated file, the warning returned by lll will
be ignored.
But if we return a linter error here, and this error happens for an autogenerated
file the error will be discarded (fine), but all the subsequent errors for lll will
be discarded for other files and we'll miss legit error.
2018-08-02 21:35:02 +03:00
Denis Isaev
b1948fdbaa
remove GOLANGCI_COM_RUN: make runs in golangci.com and local runs identical 2018-07-29 23:52:10 +03:00
Denis Isaev
55cdda4166
Fix #159: add silent option to .golangci.example.yml 2018-07-29 23:43:19 +03:00
Denis Isaev
973c9fdfd8 Fix #126: fix working with symlinks v1.9.3 2018-07-29 22:45:35 +03:00
Denis Isaev
ca558ca571 Closes #154: set typecheker sizes as types.SizesFor(build.Default.Compiler, build.Default.GOARCH) 2018-07-29 22:30:55 +03:00
Denis Isaev
8156b9f7e9 Closes #104: improve readability of memory comparison 2018-07-29 20:28:35 +03:00
Denis Isaev
069e66aa91 Closes #75: golangci-lint linters now prints current linters configuration 2018-07-29 20:28:27 +03:00
Denis Isaev
d02ac2466e disable go1.11 in travis and make some small fixes for go1.11 v1.9.2 2018-07-29 13:00:41 +03:00
Denis Isaev
3a806e9c78
add gcc to dockerfile: cgo doesn't work without it 2018-07-28 23:49:55 +03:00
Denis Isaev
99d04546ce
fix crashes on go1.11: build releases on go1.11 2018-07-28 23:48:17 +03:00
Denis Isaev
c5721f50d0 update Gopkg.lock for a newer dep format and update x/tools package 2018-07-28 23:47:22 +03:00
Denis Isaev
5d04557a1f #156, #157: properly detect type errors in dependencies 2018-07-28 23:47:22 +03:00
Fabrice Rabaute
e17b9543e7 Add tab-width option to lll linter 2018-07-25 23:13:14 +03:00
Denis Isaev
6ccd0c5e53
docs: ISSUE_TEMPLATE.md, PULL_REQUEST_TEMPLATE.md 2018-07-25 23:09:56 +03:00
Denis Isaev
d993a423bf
docs: remove extra new line from .golangci.example.yml 2018-07-03 19:49:05 +03:00
Eldar Rakhimberdin
d78dccef76 Fix comment message 2018-07-03 19:47:05 +03:00
Eldar Rakhimberdin
9b866bcff1 Fix comment message 2018-07-03 19:47:05 +03:00
Denis Isaev
79776b41f9 Fix #150: don't recommend vendoring of golangci-lint in README 2018-07-03 09:52:13 +03:00
Denis Isaev
1774bf22a2 Fix #148: fix false-positive from unused if cgo is used v1.9.1 2018-07-01 21:52:21 +03:00
Denis Isaev
95b0757a3f Fix marking file with cgo as autogenerated 2018-07-01 21:52:21 +03:00
Denis Isaev
894ba0df9f Resolve #146: prealloc linter support v1.9 2018-06-30 22:07:12 +03:00
Denis Isaev
815d13148f docs: add changelog, rewrite internal section, add trusted by section 2018-06-30 21:00:47 +03:00
Denis Isaev
35f9d8e5b9 Fix unparam crash on nil constant 2018-06-30 20:08:05 +03:00
Denis Isaev
facc3a096a Fix #98: nakedret linter support 2018-06-30 15:41:47 +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
70193b9b4d
docs: improve shell installation info 2018-06-30 09:24:50 +03:00
Denis Isaev
3ce87e6245 Fix #139: don't fail govet on cgo 2018-06-30 09:23:31 +03:00
Denis Isaev
6dd4f07c50
Fix file leak in lll v1.8.1 2018-06-29 08:28:12 +03:00
Denis Isaev
1a9af12d6d Fix #96: support lll v1.8 2018-06-28 23:03:11 +03:00
Denis Isaev
7b2a63dfa6 Fix #100: misspell linter support 2018-06-28 21:52:30 +03:00
Denis Isaev
88ebabc4bc Fix #109, #116, #131: don't report in deadcode about unused test functions in main package v1.7.3 2018-06-28 10:17:16 +03:00
Denis Isaev
5ef542facd Print first compilation error in warning about inability to run megacheck because of compilation errors 2018-06-28 09:18:41 +03:00
Denis Isaev
fb38e51c83 add all warnings and error to json if out-format=json 2018-06-24 11:29:41 +03:00