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

1008 Commits

Author SHA1 Message Date
SalvadorC
1dbda0e473
Merge pull request #88 from mgechev/minko/update-docs
docs: update the documentation
2018-10-26 07:48:50 +02:00
mgechev
8e24648520
docs: update the documentation
I did some formatting:

- There were new lines in the middle of few sentences
- Added newlines before code blocks
- Removed trailing spaces

I also dropped statements in the form "This rule checks/does/warns...", when this was clear from the rule's explanation.
2018-10-25 20:29:31 -07:00
SalvadorC
3ef16e4c45 Doc rules description (#87)
* partial document

* complete list of rules descriptions

* Links rules in README to corresponding descriptions

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Co-Authored-By: chavacava <salvadorcavadini+github@gmail.com>

* Update RULES_DESCRIPTIONS.md

Includes @mgechev remarks
2018-10-25 20:15:13 -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
mgechev
4b3d324865
docs: update the list of contributors 2018-10-17 10:07:33 -07:00
SalvadorC
6633ce6f24
Merge pull request #85 from gsamokovarov/empty-lines-comments-check
Fix the same-line comments detection in the empty-lines rule
2018-10-13 20:15:31 +02: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
mgechev
69f012a7d9
Merge master 2018-10-11 14:55:17 -07:00
mgechev
892cedd764
docs: add description for empty-lines 2018-10-11 14:54:27 -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
SalvadorC
e9013628d7
Merge pull request #78 from xuri/miscellaneous
Fix rule name in README, and format code.
2018-10-03 14:55:27 +02:00
xuri
7d2c43c827
Rename rule name waitgroup-by-copy to waitgroup-by-value 2018-10-03 16:01:41 +08:00
xuri
c781c8b090
Fix rule name in README, and format code. 2018-10-03 14:12:19 +08:00
Minko Gechev
cd6459542b
docs: add pull request template 2018-10-01 12:34:37 -07:00
xuri
9545122d39 New rule: atomic (#77) 2018-10-01 12:24:17 -07:00
SalvadorC
6ebe5bbb1e waitgroup-by-value (new rule) (#76)
* waitgroup-by-value (new rule)

* code simplification
2018-09-30 12:29:11 -07:00
SalvadorC
672b7cdf37
Merge pull request #75 from xuri/range-loop-var
New rule: range-loop-var
2018-09-29 07:07:33 +02:00
SalvadorC
f3834d0604
Removes linter warning
Renamed unused parameter `arguments` to `_`
2018-09-29 07:04:10 +02:00
xuri
924e3db3ba
Rename rule range-loop-var to range-val-in-closure. 2018-09-29 11:32:32 +08:00
xuri
b34a6c053e
New rule: range-loop-var 2018-09-27 23:21:10 +08:00
SalvadorC
388baa3eeb Fix linter warnings (recommended config) in the code (#71) 2018-09-22 15:27:22 -07:00
SalvadorC
bd4139713d fix issue [#59] (#70) 2018-09-21 10:51:01 -07:00
mgechev
0c79a9c405
docs: update readme 2018-09-20 10:47:03 -07:00
Pavel Sapezhko
20b1f54a85 Add missed max-public-structs rule to all list (#69) 2018-09-18 08:19:25 -07:00
Sylvain Kerkour
02575a7674 Add the imports-blacklist rule (#68)
* Add the imports-blacklist rule with tests

* Add the imports-blacklist rule to README.md

* Update the imports-blacklist rule to use map[string]bool so that we can have the algorithm in Visit below with O(n) instead of O(n*m)

* Fix the imports-blacklist rule to be case sensitive
2018-09-17 13:06:42 -07:00
SalvadorC
7240bd56d0
Merge pull request #62 from xuri/return-value-limit
New rule: return-result-limit
2018-09-17 21:56:59 +02:00
mgechev
21b7654079
docs: update the list of contributors 2018-09-17 12:40:59 -07:00
mgechev
1b550a8467
build: enable go modules in makefile 2018-09-17 12:32:54 -07:00
mgechev
8fcd76f422
chore: update makefile & developing 2018-09-17 12:23:14 -07:00
mgechev
6c5c870315
ci: update travis.yml 2018-09-17 12:20:50 -07:00
Sylvain Kerkour
2e16582cbc New formatter: unix (#65) 2018-09-17 11:57:56 -07:00
Sylvain Kerkour
2387290dcf Add support for go 1.11 dependency management (#64)
* Add support for go 1.11 dependency management

* Delete old dep dependencies management files
2018-09-17 11:50:37 -07:00
xuri
f02afab00f
Check max value and add more information about what the rule received as argument. 2018-09-17 20:17:21 +08:00
xuri
dd1a8bf4e6
Add test case for function-result-limit rule, and updated README 2018-09-17 18:50:04 +08:00
SalvadorC
85f716873b
Merge pull request #61 from mgechev/minko/custom-inits
Add white & black lists for var-naming
2018-09-17 12:47:21 +02:00
xuri
0c243f004c
Rename rule return-argument-limit to function-result-limit 2018-09-17 17:06:53 +08:00
xuri
f0ec17c8d5
New rule: return-argument-limit 2018-09-17 15:22:07 +08:00
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
SalvadorC
eeabcb5376 removes debug trace (#57) 2018-09-09 08:33:45 -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