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

83 Commits

Author SHA1 Message Date
mgechev
90f51530cc
Add white & black lists for var-naming
This PR introduces a white & black lists of initialisms for the
`var-naming` rule.

Now the rule can be configured with:

```toml
[rule.var-naming]
  arguments = [["ID"], ["VM", "BAR"]]
```

This way, the linter will ignore `customId` but will throw on `customVm` or `customBar`.

Fix #41
2018-09-15 15:05:31 -07:00
mgechev
8d6642ccea
docs: update the list of recommended rules 2018-09-13 19:21:28 -07:00
SalvadorC
f004425b6e redefines-builtin-id (new rule) (#60) 2018-09-13 19:19:49 -07:00
mgechev
effde543d8
Merge branch 'master' of github.com:mgechev/revive
* 'master' of github.com:mgechev/revive:
  fix package names in docs for errorf rule (#56)
2018-09-08 17:49:20 -07:00
mgechev
9d5fc74f8b
docs: update the list of contributors 2018-09-08 17:48:14 -07:00
Tomasz
70fa51b7a5 fix package names in docs for errorf rule (#56) 2018-09-04 07:18:28 -07:00
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
936bc94793 Adds details on disabling the linter on a specific line (#52) 2018-08-14 13:22:52 -07:00
SalvadorC
613fd24a3b modifies-value-receiver (new rule) (#51) 2018-08-13 15:18:28 -07:00
mgechev
6b0ad59b9d docs: reorder plugins 2018-07-31 12:20:58 -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
mgechev
7773f47324
Merge master 2018-07-23 16:45:40 -07:00
mgechev
3cbd027513
docs: add recommended config 2018-07-23 16:44:51 -07:00
SalvadorC
3d8d46af0b flag-parameter (new rule) (#44)
* flag-parameter (new rule)

* fix failure confidence
2018-07-21 22:58:48 -07:00
mgechev
f555377e10
Merge branch 'master' of github.com:mgechev/revive
* 'master' of github.com:mgechev/revive:
  add-constant (new rule) (#39)
  New rule: unreachable-code (#38)
  New formatter: checkstyle (#37)
  fix modifies-parameter name in README (#36)
2018-07-20 16:56:46 -07:00
mgechev
686fda4c1c
Update the list of contributors 2018-07-20 16:56:37 -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
haya14busa
7c17e85217 fix modifies-parameter name in README (#36) 2018-07-14 18:39:49 -07:00
mgechev
8b99937f99
Update the list of contributors 2018-07-13 15:02:51 -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
Markus Wiegand
1cab2ac566 add atom package 'linter-revive' to supported editors (#32) 2018-07-10 20:04:39 -07:00
mgechev
ca24398638
Update README.md 2018-07-07 15:15:12 -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
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
a1d3163745
Update the list of contributors 2018-06-14 17:31:32 -07:00
Veniamin Krol
83bd86be4f Fix typo in README.md (#21) 2018-06-13 12:35:38 -07:00
mgechev
fb3c2d09af
Update list of contributors 2018-06-09 13:18:47 -07:00
mgechev
8198433610
Update readme with vim support 2018-06-08 16:04:26 -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
dc6767b811
Add toc 2018-06-08 10:28:17 -07:00
mgechev
05db4673db
Add list of contributors 2018-06-08 10:24:28 -07:00
chavacava
cbe45ffc79 Adds rule superfluous-else (an extension of indent-error-flow) (#13)
* Adds rule superfluous-else (an extension of indent-error-flow)

* Fix superfluous-else rule struct namming.

* Adds superfuous-else rule to the rules table
2018-06-08 07:06:29 -07:00
mgechev
f74d3bd5ee
Update readme 2018-06-01 11:28:50 -07:00
mgechev
a4da5361d2
Update the documentation for comment annotations
Fix #1
2018-06-01 10:54:30 -07:00
mgechev
a6c7415c67
Update documentation for generated files
Related to #4
2018-06-01 10:30:40 -07:00
mgechev
1686f0b237
Introduce optional type checking
Enable optional type checking.
2018-05-31 21:43:02 -07:00
mgechev
8e4c7821fd
Update with accurate stats 2018-05-31 20:00:04 -07:00
mgechev
ab618bf2c4
Update readme 2018-05-31 19:53:26 -07:00
mgechev
27994a0736
Update readme 2018-05-31 13:30:54 -07:00
mgechev
1362c7b7cb
Update readme 2018-05-31 10:02:40 -07:00
mgechev
e06c92357f
Add information about vscode 2018-05-30 18:34:35 -07:00
mgechev
9e52d7ffdd
Use new dots 2018-05-30 17:03:27 -07:00
mgechev
e4877f3129
Update readme 2018-05-30 13:44:18 -07:00