1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
Commit Graph

902 Commits

Author SHA1 Message Date
chavacava
fa939adbf0
Adds support for new type alias any in the rule redefines-built-in (#659)
* adds support for any type alias

* adds more representative tests
2022-03-29 10:51:01 +02:00
chavacava
5f6f0eb142
adds usage of revive as third party library (#653) 2022-03-20 12:53:57 +01:00
Bernardo Heynemann
1c283837a9
Allow revive to be called with extra linters (#650)
This change allows revive to be called from main.go
in other libraries and pass in a list of custom
linters to be added to the built-in linters found in config

Co-authored-by: Bernardo Heynemann <bernardo.heynemann@coinbase.com>
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2022-03-20 09:12:51 +01:00
chavacava
5ce2ff53c0
removes duplicated utility function (#652) 2022-03-18 15:00:41 +01:00
renovate[bot]
61222a1967
fix(deps): update github.com/chavacava/garif digest to 5cad0b5 (#651)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-17 09:51:20 -07:00
renovate[bot]
de50c6ae09
fix(deps): update module golang.org/x/tools to v0.1.10 (#649)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-15 10:12:28 -07:00
Bernhard Reisenberger
f335f9792d
range-val-address: improve detection (#647) 2022-03-12 09:32:57 +01:00
subham sarkar
577441d60c
format sources w/ gofumpt (#643)
Signed-off-by: subham sarkar <sarkar.subhams2@gmail.com>
2022-03-02 08:24:55 +01:00
subham sarkar
54d9a09ab5
Incorrect handling of token.{LEQ,GEQ} for constant-logical-expr (#642)
* fix: incorrect handling of token.{LEQ,GEQ} for constant-logical-expr lint

Signed-off-by: subham sarkar <sarkar.subhams2@gmail.com>

* tiny modification in comments

Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2022-02-27 09:37:51 +01:00
chavacava
d4fbc92440
fix issue #637 (#638) 2022-02-15 22:46:24 +01:00
Tom
baa70eb87c
Run go mod tidy to update go.sum (#633)
Co-authored-by: Tom <tommygun731@gmail.com>
2022-02-09 20:55:26 -08:00
Ahmed
58e6243b64
use ghcr.io (#631) 2022-02-09 10:55:00 +01:00
Ahmed
c350076f4e
login to github registry to push docker images (#630) 2022-02-08 10:40:43 +01:00
chavacava
e0fa03a13a
Max open files (#628)
* adds max_open_files flag

* adds doc of max_open_files flag

* amends commmit
2022-02-07 17:36:03 -08:00
Oleg Butuzov
6545203e2d
refactor(cyclomatic): improved message for cyclomatic rule (#629) 2022-01-31 17:33:43 +01:00
renovate[bot]
47ba3e360c
Update module golang.org/x/tools to v0.1.9 (#626)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-28 09:28:57 -08:00
Ludovic Fernandez
47a1cedde5
fix: invalid rule name in error message (#627) 2022-01-27 08:32:08 +01:00
renovate[bot]
8aab7c6042
Update module github.com/BurntSushi/toml to v1 (#620)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-19 12:59:08 -08:00
chavacava
b721f69625
fix #622 (Rule 'var-naming' should allow Fuzz_xxx) (#623) 2022-01-18 15:26:29 +01:00
Euan Kemp
af953e6189
Allow whitelist for the context parameter check (#616)
* Allow a whitelist for the context parameter check

This allows users to configure a set of types that may appear before
`context.Context`.

Notably, I think this rule is useful for allowing the `*testing.T` type
to come before `context.Context`, though there may be other uses (such
as putting a tracer before it, etc).

See #605 for a little more context on this.

Fixes #605

* Save a level of indentation in context-as-arg validation

We can unindent if we make the above check more specific

* refactoring taking into account chavacava's review

Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2021-12-31 17:11:18 -08:00
Aleksey Bakin
305f6c13d2 var-naming rule: note about initialisms 2021-12-29 23:29:46 -08:00
Renovate Bot
43d0e31c4c Update module golang.org/x/tools to v0.1.8 2021-12-07 09:20:51 -08:00
doniacld
faba17a90f
Fix package check in error-strings rule (#610) (#611)
Co-authored-by: SalvadorC <salvadorcavadini+github@gmail.com>
2021-10-30 08:45:37 +02:00
doniacld
0fada9d76c
Update error-strings rule (#608) (#609)
Co-authored-by: SalvadorC <salvadorcavadini+github@gmail.com>
2021-10-28 21:26:02 +02:00
SalvadorC
2c895fb33f
Code cleanup (#606) 2021-10-23 13:25:41 +02:00
doniacld
5d04216294
Add optimize-operands-order rule (#599) (#603)
Co-authored-by: SalvadorC <salvadorcavadini+github@gmail.com>
2021-10-23 09:29:14 +02:00
David Jimenez
8a3653ca49
Add debug logger (#604)
Signed-off-by: David Jimenez <dvejmz@sgfault.com>
2021-10-20 19:32:31 +02:00
doniacld
0ee7866c45
Add build and test steps in CI on pull request (#602) 2021-10-18 19:27:26 +02:00
zeripath
3f99b6ceb1
File file-header.go (#601)
Add missing fmt import
2021-10-17 21:12:36 +02:00
SalvadorC
76b8c57329
Memoization of rule arguments (#595) 2021-10-17 20:34:48 +02:00
Jeferson Ferreira
b7d1908051
Avoids missing version description when using go install (#600) 2021-10-17 20:30:33 +02:00
doniacld
9c30b4479c
Run revive over a invalid go source file (#364) (#598) 2021-10-17 19:58:29 +02:00
chavacava
55e1594efd fixes false positive in unconditional-recursion 2021-10-15 13:14:03 -07:00
David Jimenez
b331445a16
Set all version flags at build time so they have correct values (#593) 2021-10-15 10:35:15 +02:00
doniacld
c0f2d40eaa
Add Docker image in release (#489) (#590) 2021-10-15 08:36:14 +02:00
doniacld
be81121399
Add banned characters rule (#532) (#591) 2021-10-14 20:56:29 +02:00
Jan Steinke
71b31e26ab
overwrite error status code from config with set_exit_status (#589)
add set_exit_status flag
2021-10-12 22:10:35 +02:00
Abel
935acca925
Fix typo for gorush description (#588) 2021-10-08 09:33:22 +02:00
SalvadorC
1c654afd91 Update config.go 2021-10-04 09:37:01 -07:00
SalvadorC
12e4e8c172 Update config.go
removes use of `math.Inf(1)`
2021-10-04 09:37:01 -07:00
Mihai Todor
c3af594461 Fix config initialisation
Allow setting confidence to 0
2021-10-04 09:37:01 -07:00
Mihai Todor
099eeaca0c Fix get default config test 2021-10-04 09:37:01 -07:00
sina safari
62db66915b
add new rule time equal (#584) 2021-10-01 13:55:53 +02:00
renovate[bot]
111721be47
Update module golang.org/x/tools to v0.1.7 (#586)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-30 13:39:59 -07:00
SalvadorC
e545098165
fixes issue #577 (#581) 2021-09-30 13:37:44 -07:00
sina safari
0bcc996acf
fixed some complex code (#580) 2021-09-26 08:28:58 +02:00
renovate[bot]
527bea8bea
Update github.com/mgechev/dots commit hash to e955255 (#578)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-22 16:15:23 -07:00
renovate[bot]
0e551e24ca
Update module golang.org/x/tools to v0.1.6 (#575)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-22 12:17:27 -07:00
renovate[bot]
567f022d91
Update module github.com/fatih/color to v1.13.0 (#576)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-22 12:13:54 -07:00
Oleg Butuzov
d7e3d5eac7
fix: time-naming issue #571 (#572)
resolves #571
2021-09-12 16:09:14 -07:00