62 Commits

Author SHA1 Message Date
Oleksandr Redko
521a6763ce
dev: replace raw loops with funcs from slices and maps (#4299)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2024-01-04 22:43:50 +01:00
Justin Fuller
fc509b37dd
docs: update link (#4274) 2023-12-20 16:12:35 +01:00
dependabot[bot]
da3eb3138a
build(deps): bump github.com/fatih/color from 1.15.0 to 1.16.0 (#4194)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-11-12 13:23:22 +01:00
Yury Gargay
9b20d49dc2
output: convert backslashes to forward slashes for GitHub Action annotations printer (#4149)
Some checks failed
Release a tag / release (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile]) (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/alpine.Dockerfile]) (push) Has been cancelled
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-10-24 14:38:15 +02:00
Chaliy Roman Aleksandrovich
8c519af80b
codeclimate: less memory allocation (#3882) 2023-06-04 07:59:04 +02:00
Oleksandr Redko
1948081d84
dev: remove unused ctx parameter from Printer (#3761) 2023-04-16 18:18:53 +02:00
Ludovic Fernandez
00d17cc8d1
output: add colored-tab (#3729) 2023-04-04 01:57:22 +02:00
Oleksandr Redko
1e700732e7
dev: gofmt -w -r 'interface{} -> any' pkg scripts (#3742) 2023-03-28 16:22:55 +02:00
ferhat elmas
075691c4e9
feat: add TeamCity output format (#3606)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
2023-02-27 21:22:57 +01:00
dependabot[bot]
a9acb8db53
build(deps): bump github.com/ryancurrah/gomodguard from 1.2.4 to 1.3.0 (#3518)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-01-29 17:53:40 +01:00
Oleksandr Redko
d19398964c
chore: Do not use methods on pointer and value receivers (#3321) 2023-01-21 13:20:05 +00:00
sink
6740559b13
code-climate: add default severity (#3294)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2022-10-20 21:18:24 +00:00
Ludovic Fernandez
19a338706a
dev: reference all the debug keys and env vars (#3196) 2022-09-06 11:48:25 +00:00
Ludovic Fernandez
e443887a4f
dev: add printers unit tests. (#2461) 2022-01-10 09:13:47 +01:00
Donal Byrne
eaed228d2f
Print error text in <failure> tag content for more readable junit report (#2460) 2022-01-05 09:17:33 +01:00
Lauris BH
d209389625
Add support for multiple outputs (#2386) 2022-01-04 21:36:27 +01:00
Rafik Draoui
e788757b32
Ensure that the Issues key in JSON format is a list (#2358)
This makes the data more consistent and easier to use with other tools.
For example, a third-party tool can iterate over `Issues` without having
to make a preliminary null check.
2021-11-14 14:33:19 -08:00
Oleksandr Redko
f9f6486e15
docs: change Github to GitHub in comments and docs (#2341) 2021-11-02 19:25:21 +01:00
Oleksandr Redko
1be9570abf
Refactor: preallocate slices (#2340) 2021-11-02 09:27:06 -07:00
Matthew Cobbing
2862ca630c
output: generate HTML report (#2043) 2021-06-08 01:33:40 +02:00
Andrew Shannon Brown
ec46f42e01
Verify linter name in integration tests (#1595) 2021-01-15 21:37:56 +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
Ryan Currah
fa7adcbda9
add ability to set issue severity (#1155)
* add ability to set issue severity for out formats that support it based on severity rules

* fix lint issues

* change log child name

* code climate omit severity if empty

* add tests for severity rules, add support for case sensitive rules, fix lint issues, better doc comments, share processor test

* deduplicated rule logic into a base rule that can be used by multiple rule types, moved severity config to it's own parent key named severity, reduced size of NewRunner function to make it easier to read

* put validate function under base rule struct

* better validation error wording

* add Fingerprint and Description methods to Issue struct, made codeclimate reporter easier to read, checkstyle output is now pretty printed
2020-05-25 08:21:42 -04:00
☃ Elliot Shepherd
c88df8f473
Fix nil pointer in codeclimate.go (#1077)
Some issues don't have any source lines
2020-05-11 22:10:39 +03:00
ced42
7526c8d347
Add tests, failures and errors attributes on testsuites (#1072) 2020-05-07 17:05:10 +03:00
Viktoras Makauskas
b7dada2249 slight cleanup 2020-04-11 00:41:24 +03:00
Viktoras
69a4e811d7
Update pkg/printers/github.go
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
2020-04-11 00:12:29 +03:00
Viktoras Makauskas
276e0d1e3b Fixing linter issues 2020-04-11 00:11:37 +03:00
Viktoras
da4a14d827
Update pkg/printers/github.go
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
2020-04-11 00:02:35 +03:00
Viktoras Makauskas
ee2c62132c Fixing linter issues 2020-04-10 23:59:07 +03:00
Viktoras Makauskas
d7222c7d38 Adding github actions output format 2020-04-10 23:46:19 +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
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
Glen Mailer
97fcafd38c Update format of junit xml output to mark failures as such (#632) 2019-09-10 11:21:08 +03:00
Sonia Hamilton
5c86bfc905 junit-xml output 2019-06-09 13:23:17 +03:00
Elliot Shepherd
186fe37bf8 add code-climate output format
Just the minimum of the format, to support GitLab CI Code Quality - https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html
2019-02-11 14:26:26 +08:00
Denis Isaev
84c9c65f39 fix #243: support Scopelint linter 2018-11-06 08:11:25 +03:00
Denis Isaev
8fceb7fc47
Fix #209: support goimports.local-prefix option for goimports 2018-10-28 18:47:56 +03:00
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
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
b900926bfc Fix #121, fix #186: remove --silent,-s flag: be silent by default 2018-08-08 23:55:01 +03:00
Denis Isaev
1a9af12d6d Fix #96: support lll 2018-06-28 23:03:11 +03:00
Denis Isaev
fb38e51c83 add all warnings and error to json if out-format=json 2018-06-24 11:29:41 +03:00
Henrik Johansson
f239b80ce1 disable the congrats message
There is now an extra switch '-s' to disable the congrats message when
there are no issues detected

Fixes: #110
2018-06-17 00:17:48 +03:00
Denis Isaev
9fa9e2b3f8 Fix #106: fix transitive expanding of nolint: we could nolint more lines than needed 2018-06-16 10:56:58 +03:00
Denis Isaev
9181ca7175 Fix #78: log all warnings
1. Log all warnings, don't hide none of them
2. Write fatal messages (stop analysis) with error log level
3. Remove ugly timestamp counter from logrus output
4. Print nested module prefix in log
5. Make logger abstraction: no global logging anymore
6. Refactor config reading to config.FileReader struct to avoid passing
logger into every function
7. Replace exit codes hardcoding with constants in exitcodes package
8. Fail test if any warning was logged
9. Fix calculation of relative path if we analyze parent dir ../
10. Move Runner initialization from Executor to NewRunner func
11. Log every AST parsing error
12. Properly print used config file path in verbose mode
13. Print package files if only 1 package is analyzedin verbose mode,
  print not compiling packages in verbose mode
14. Forbid usage of github.com/sirupsen/logrus by DepGuard linter
15. Add default ignore pattern to folint: "comment on exported const"
2018-06-14 23:09:04 +03:00
Maksym
219a5479c8 Checkstyle support (#95)
Implement checkstyle printer
2018-06-13 20:54:13 +03:00
Denis Isaev
541656cc20
Write JSON output more compactly and output object, not array 2018-06-11 11:19:40 +03:00