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

32 Commits

Author SHA1 Message Date
SalvadorC
81bdff4472 constant-logical-expr (new rule) (#55)
* suspicious-logical-expr (new rule)

* renames 'suspicious-logical-expression' to 'constant-logical-expression'
2018-08-23 11:45:10 -07:00
SalvadorC
771aa23069 bool-literal-in-expr (new rule) (#54)
* bool-literal-in-expr (new rule)

* bool-literal-in-expr: add test case and fix typo
2018-08-23 11:10:17 -07:00
SalvadorC
613fd24a3b modifies-value-receiver (new rule) (#51) 2018-08-13 15:18:28 -07:00
SalvadorC
6fa95fb6ba struct-tag (new rule) (#47) 2018-07-28 09:07:31 -07:00
SalvadorC
0404d66548 unnecessary-stmt (new rule) (#45)
* simpler (new rule)

* simpler: checks unitary switches

* unnecessary-stmt (new rule)
2018-07-27 22:38:39 -07:00
SalvadorC
3d8d46af0b flag-parameter (new rule) (#44)
* flag-parameter (new rule)

* fix failure confidence
2018-07-21 22:58:48 -07:00
chavacava
5248ad8ed9 add-constant (new rule) (#39) 2018-07-17 12:21:27 -07:00
chavacava
db6c522a37 New rule: unreachable-code (#38)
* 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

* [WIP] fix multiple file test

* draft solution for detecting confusing-names through multiple files

* [WIP] confusing-name multiple files

* clean-up

* draft working version

* cleaner version + more informative messages

* adds check on struct field names

* fix config.go

* clean master

* new ADS rule: newerr

* ADS-print working version

* ads-print final version

* ads-lost-err working version

* confusing-namming: fix tests

* removes ads-* rules

* rule unreachable-code

* unreachable-code refactored version

* skip corner case of mandatory return
2018-07-16 14:23:47 -07:00
chavacava
439cef2893 New formatter: checkstyle (#37)
* 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

* [WIP] fix multiple file test

* draft solution for detecting confusing-names through multiple files

* [WIP] confusing-name multiple files

* clean-up

* draft working version

* cleaner version + more informative messages

* adds check on struct field names

* fix config.go

* clean master

* new ADS rule: newerr

* ADS-print working version

* ads-print final version

* ads-lost-err working version

* confusing-namming: fix tests

* removes ads-* rules

* Adds checkstyle formatter

* Update README.md

fix typo
2018-07-15 12:45:15 -07:00
Markus Wiegand
095a25d375 Add formatter NDJSON (#34)
* Add formatter json-stream

* use new json struct in json-stream

* rename json-stream formatter to ndjson

* add ndjson formatter to readme
2018-07-13 15:01:27 -07:00
chavacava
c2e2dbac85 New rule: unused-parameter (#28)
* 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

* [WIP] fix multiple file test

* draft solution for detecting confusing-names through multiple files

* [WIP] confusing-name multiple files

* clean-up

* draft working version

* cleaner version + more informative messages

* adds check on struct field names

* fix config.go

* clean master

* new ADS rule: newerr

* ADS-print working version

* ads-print final version

* ads-lost-err working version

* confusing-namming: fix tests

* unused-parameter: working version

* WIP adds scopes - still imprecise ( eg a:=a is not detected as use)

* w/scopes and more precise

* adds test on structs

* adds test w/ var shadowing

* more precise handling of for/switch statements

* fix check of +=, -=, *= and the like. Adds better support for slices and switchs
2018-07-07 18:40:02 +10:00
chavacava
b8eababb0d New rule: confusing-results (#27)
* 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

* confusing-results working version
2018-07-02 12:09:58 +10:00
chavacava
443bfc9e0b New rule: Confusing naming (#16)
* 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

* [WIP] fix multiple file test

* draft solution for detecting confusing-names through multiple files

* [WIP] confusing-name multiple files

* draft working version

* cleaner version + more informative messages

* adds check on struct field names

* confusing-namming: fix tests
2018-07-02 12:05:20 +10:00
chavacava
68deb55492 New rule deep-exit (#26)
* 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

* deep-exit: first working version

* fix pbs from  @mgechev review

* deep-exit: modifies failure message
2018-06-27 06:21:03 +10:00
chavacava
b2532b3c33 New rule: modifies-parameter (#25)
* 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

* working version
2018-06-24 17:26:21 +10:00
chavacava
f8c1094ecd New rule: get-return (#23)
* 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

* clean master

* running version

* isGetter now checks for non lowercase characters
2018-06-22 21:21:09 +10:00
mgechev
1b84ff83dd
Add missing rule in config 2018-06-08 14:22:21 -07:00
chavacava
1fa5046357 Adds new rule empty-block (#14)
* Adds rule superfluous-else (an extension of indent-error-flow)

* initial (non functional) version

* empty-block working version

* adds tests for empty-block rule

* Adds empty-block to the rules table

* code clean-up
2018-06-08 12:41:49 -07:00
mgechev
64636caedd
Fix package level type checking 2018-05-31 19:49:39 -07:00
mgechev
21ff630a2b
Same behavior as golint with no arguments 2018-05-30 18:31:38 -07:00
mgechev
9e52d7ffdd
Use new dots 2018-05-30 17:03:27 -07:00
mgechev
6c9ea8cf2d
Refactoring and renaming 2018-05-26 21:28:31 -07:00
mgechev
8c53dad5ec
Rename and docs 2018-05-26 16:14:36 -07:00
mgechev
87860f3d8a
Add new formatter 2018-05-26 13:47:16 -07:00
mgechev
b8e1c67e9c
Rename formatter 2018-05-26 12:08:02 -07:00
mgechev
90b2213300
Update readme & refactor 2018-05-25 13:01:49 -07:00
mgechev
fcfe170bd2 Refactoring 2018-02-03 19:47:09 -08:00
mgechev
eae264645b Renaming 2018-02-03 18:56:45 -08:00
mgechev
837a85713b Update failures 2018-02-02 13:11:40 -05:00
mgechev
cf63744a6a Fix formatter and output 2018-01-27 23:03:07 -08:00
mgechev
deb72d6238 Add default formatter 2018-01-27 17:01:18 -08:00
mgechev
8746067321 Implement command line arguments 2018-01-27 16:22:17 -08:00