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
SalvadorC
c967fd68ea
struct-tag warns on private fields with tags ( #131 )
2019-06-01 10:34:43 +02:00
SalvadorC
c8ee35a500
adds blacklist to unhandled-error ( #128 )
...
* adds blacklist for unhandled-error
* uses ignoreList in place of blackList
2019-04-29 19:56:12 -07:00
SalvadorC
8aa0cd8bd4
unhandled-error (new rule) ( #124 )
...
* unhandled-error (new rule)
* better failure msg
* encapsulates error type detection
2019-04-27 19:23:17 -07:00
SalvadorC
e8c1baf8ac
optimizes import-blacklist ( #123 )
2019-04-22 10:58:02 -07:00
SalvadorC
2474f6cecb
simpler and more efficient implementation of unused-parameter ( #121 )
2019-04-21 10:13:03 -07:00
SalvadorC
00a86ae1fd
new rule: unused-receiver ( #119 )
...
* new rule: unused-receiver
* unused-receiver: adds more test cases
2019-04-18 10:35:51 -07:00
SalvadorC
745bcf65aa
bare-return (first working version) ( #117 )
...
New rule bare-return
2019-04-17 22:55:52 +02:00
SalvadorC
2ce440cf96
new rule: import shadowing ( #114 )
...
* Adds rule superfluous-else (an extension of indent-error-flow)
* Fix superfluous-else rule struct namming.
* Adds superfuous-else rule to the rules table
* Adds confusing-naming rule
* adds multifile test
* clean-up
* fix config.go
* clean master
* new ADS rule: newerr
* ADS-print working version
* ads-print final version
* ads-lost-err working version
* fix ads-print
* removes ads rules from master
* new rule: import-shadowing
* removes ads rules from master
* new rule: import-shadowing
* fix defaults
* adds explanations on the rule implementation
2019-03-27 11:46:20 -07:00
Dian
44eed7edb7
fix error return rule to allow multiple error return values ( #110 )
...
* fix error return rule to allow multiple error return values
please check golint related updates here: golang/lint@8379672
When returning multiple values with an error,
lint checks if the error is the last return value.
But the implementation actually is checking for all return values
except for the last one, and throw the alert if it found an error.
There is a (edge) case where some function returning more than one error
is getting a false positive even when the last return value is an error.
This patch adds an early check, to see if the last return value is an error
and if so, it will pass silently.
* Fix return error
* add test changes
2019-03-20 11:54:27 -07:00
SalvadorC
fbefad8558
New rule: duplicated-imports ( #111 )
...
* Adds rule superfluous-else (an extension of indent-error-flow)
* Fix superfluous-else rule struct namming.
* Adds superfuous-else rule to the rules table
* Adds confusing-naming rule
* adds multifile test
* clean-up
* fix config.go
* clean master
* new ADS rule: newerr
* ADS-print working version
* ads-print final version
* ads-lost-err working version
* adds duplicated-imports rule
* adds duplicated-imports rule
2019-03-20 11:54:03 -07:00
SalvadorC
55fe366696
call-to-gc (new rule) ( #90 )
2018-10-31 07:32:23 -07:00
mgechev
376425d517
refactor: remove URL field from the failure struct
2018-10-30 15:37:27 -07:00
xuri
3c177e2824
New rule: line-length-limit ( #86 )
...
* New rule: line-length-limit
* simplify the panic message of rule line-length-limit
* Refactors `line-length-limit` rule, use private `check` method instead of `Visit`
2018-10-19 08:18:33 -04:00
SalvadorC
3cae2fa6f9
Update empty-lines.go
...
removes warning on unused parameter
2018-10-13 20:13:29 +02:00
Genadi Samokovarov
b7d9bce0b6
Fix the same-line comments detection in the empty-lines rule
...
Fixes #84 .
2018-10-13 09:47:29 -07:00
Genadi Samokovarov
04516d2f82
Handle multi-line statements edge-cases in the multi-line rule ( #83 )
...
There were many cases where the multi-line statements at the end of a
block were marked as containing empty lines, while they didn't. Or vice
versa.
2018-10-12 22:38:08 -07:00
Genadi Samokovarov
d2e0e5a0ed
Introduce the empty-lines rule that verifies there are no {head,trail}ing lines ( #81 )
2018-10-11 14:52:46 -07:00
SalvadorC
da63d0a965
Refactors atomic
rule code to move gofmt
function to utils.go (issue #79 ) ( #80 )
...
* Refactoring on atomic rule:
-Main modification: move func gofmt to utils.go
* Refactoring on constant-logical-expr rule
Simplifies equality check of subexpressions by using gofmt function
2018-10-03 11:56:57 -07:00
xuri
7d2c43c827
Rename rule name waitgroup-by-copy to waitgroup-by-value
2018-10-03 16:01:41 +08:00
xuri
9545122d39
New rule: atomic ( #77 )
2018-10-01 12:24:17 -07:00