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

142 Commits

Author SHA1 Message Date
sina safari
62db66915b
add new rule time equal (#584) 2021-10-01 13:55:53 +02:00
sina safari
0bcc996acf
fixed some complex code (#580) 2021-09-26 08:28:58 +02:00
Oleg Butuzov
d7e3d5eac7
fix: time-naming issue #571 (#572)
resolves #571
2021-09-12 16:09:14 -07:00
Oleg Butuzov
9b85893ff8
fix: switch to re.MatchString(string) instead re.Match([]byte(string)) (#574)
removes heaps allocation, feels more "native"
2021-09-12 16:05:42 -07:00
SalvadorC
18cdb55850
Exported config (#565)
* working version

* adds flag for replacing "stutters"
2021-08-26 08:36:24 -07:00
Bernhard Reisenberger
406b1ce110
range-val-address: fix false positive (#554)
range-val-address: fix false positive (closes #554)
2021-08-26 08:41:58 +02:00
SalvadorC
097f0bb533
better messages for rules' config errors (#563) 2021-08-17 12:14:42 -07:00
SalvadorC
28559501d3
fix issue 556 (#557) 2021-08-16 12:15:17 +02:00
SalvadorC
c939bb6af8
add new rule useless-break (#551) 2021-08-15 15:30:08 -07:00
chris erway
7dde483bac
Add Unwrap to common methods (#547) 2021-07-28 10:50:09 +02:00
SalvadorC
cfac8b0013
fix 534 (#536)
Closes #534
2021-06-29 21:40:40 +02:00
Robert Deusser
575ce5f61a
new rule: nested-structs (#530)
new rule: nested-structs
2021-06-15 11:36:41 +02:00
sina safari
b5ff6325c2
simplify: redundant map composite literal (#528) 2021-05-31 21:54:58 +02:00
SalvadorC
97ef50d9f7
fix 525 (#526) 2021-05-25 15:09:05 -07:00
SalvadorC
b298ffe4ee
Adds configuration option to enable all available rules (#521)
Adds configuration option to enable all available rules
2021-05-21 09:53:10 +02:00
Bernhard Reisenberger
3bac05c7a4
range-val-address: improve detection (#514)
range-val-address: improve detection
2021-05-03 14:22:35 +02:00
Keith Scroggs
2afe668e7b
Check string literals against regular expressions (#511)
Add string-format rule
2021-04-18 18:35:30 +02:00
SalvadorC
46f65914e3
new rule function-length (#504) 2021-03-20 15:45:30 -07:00
Ahmed
f8f4bf23a4
Add goreleaser & a gh workflow (#503)
* Add goreleaser & a gh workflow

* format code
2021-03-18 15:10:22 -07:00
Jakub Chábek
535f426fb8
Ignore blank import of embed if embed is actually used in the file (#501)
* Ignore blank import of embed
2021-03-06 14:04:57 +01:00
Minko Gechev
688024a5ca
Add revive linting action and fix linting errors (#455) 2020-08-15 00:50:13 +03:00
SalvadorC
fcccdca4e3
fixes issue #451 (#452) 2020-08-05 19:25:57 +03:00
SalvadorC
1412d0c6ed
new rule: unexported-naming (#443)
* new rule: unexported-naming

* better failure message
2020-07-23 02:17:20 +03:00
chavacava
ad3100c9ec adds defer rule 2020-06-08 09:40:38 -07:00
chavacava
e9bdc9ed8f removes type-checking from empty-block rule 2020-05-20 12:05:56 -07:00
chavacava
ef265b07dd removes commented code 2020-05-13 23:42:09 +02:00
chavacava
65beded8c4 Merge remote-tracking branch 'upstream/master' into unconditional-recursion 2020-05-13 22:13:08 +02:00
SalvadorC
1da965b65f
fix issue 386: Incorrectly identifies channel draining as "empty code… (#415)
* fix issue 386: Incorrectly identifies channel draining as "empty code block"

* updates doc of empty-block rule
2020-05-10 17:43:56 -07:00
chavacava
7a55cafc36 adds support for control exit statements 2020-05-09 21:43:12 +02:00
chavacava
91adb8bc8a first working version 2020-05-09 17:10:34 +02:00
chavacava
5939a81c8a removes unused code 2020-05-08 22:43:14 +02:00
chavacava
0c49c6a991 identical-branches initial implementation 2020-05-08 22:08:16 +02:00
chavacava
579c7c761f utils.gofmt now accepts a interface{} 2020-05-08 22:08:16 +02:00
SalvadorC
67c83886d7
Late return rule (#406)
* fisrt working version of late-return rule

* late-update: adds doc

* renames to early-return

* fix rule failure condition

* fix alphabetical sorting of early-return
2020-05-08 11:14:21 -07:00
Bernhard Reisenberger
22014c3f08
Add rule 'range-val-address' (#353)
* Add rule 'range-val-address'

* range-val-address: replace pick with visitor; avoid nesting; improve failure message

* range-val-address: not all callexprs are bad. limit to 'append'
2020-02-26 10:33:00 -10:00
SalvadorC
8f61c9ad71
fix issue #355 (#356) 2020-02-26 10:32:47 -10:00
SalvadorC
a24e8e7b81
String of int (#342)
* string-of-int: working version

* adds doc of string-to-int
2020-02-18 09:38:01 -08:00
SalvadorC
2bec93f05f fixes issue 290 (#294) 2020-01-07 14:46:21 -08:00
SalvadorC
9d5ed110c9 fixes issue #280 (#282) 2019-12-21 12:17:51 -08:00
chavacava
777e1b9e60 simpler implem of binEpr complexity computation 2019-12-17 22:11:32 +01:00
chavacava
e63e7cbd3d fixes computation of complexity of Bool exprs 2019-12-16 23:02:12 +01:00
chavacava
0cdcc25bc7 removes unused return value 2019-12-15 10:57:26 +01:00
chavacava
d877a0d7e8 fix binexp complexity logic 2019-12-14 16:18:53 +01:00
chavacava
2eae0cd122 fix method comment 2019-12-14 09:12:36 +01:00
chavacava
611c6f7c81 firts working version 2019-12-14 08:27:06 +01:00
dshemin
a5c77eed9f Add check for argument length to "file-header" rule 2019-12-02 02:04:49 +07:00
dshemin
9bb943735e Fix review comments 2019-11-28 10:14:21 +07:00
dshemin
3c93b9c1a4 Fix #245 File header rule: index out of range [0] with length 0 2019-11-28 01:38:43 +07:00
SalvadorC
84deee4163 fixes issue #229 (#231) 2019-09-10 10:26:47 -07:00
SalvadorC
9649b1c2a1 fix 208 struct-tag linter false positive (#209) 2019-08-05 09:21:20 -07:00