chavacava
13dafb5ea0
Merge remote-tracking branch 'upstream/master'
2019-03-21 14:17:43 +01: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
chavacava
9d44316043
fix ads-print
2019-03-18 15:06:31 +01:00
chavacava
c14c00c892
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
config.go
2019-03-18 14:03:06 +01:00
Minko Gechev
6a62ee9f02
Update the list of contributors
2019-03-01 11:45:22 -08:00
SalvadorC
202adf0786
Fix 102 ( #103 )
...
Do not require additional newline for disabling multiple rules
2019-01-24 09:14:43 -08:00
SalvadorC
e2acdb0e10
Merge pull request #101 from mapreal19/patch-1
...
Adds missing `rule` in rules examples
2019-01-21 15:22:34 +01:00
Mario Pérez
d775d613d0
Adds missing rule
in rules examples
2019-01-21 14:25:14 +01:00
SalvadorC
c878d3090d
fixes issue #98 ( #99 )
2019-01-18 07:33:40 -08:00
xuri
b4cc152955
Add excelize and aurora to "Who uses Revive" ( #96 )
2018-12-10 06:05:14 -08:00
AragurDEV
50f3790f32
Add gitea to "Who uses Revive" ( #94 )
...
When merged: https://github.com/go-gitea/gitea/pull/5422 gitea will use revive.
2018-12-04 08:45:11 -08:00
Rıdvan Şümşet
1338c47ef1
Update README.md ( #95 )
2018-12-04 08:42:55 -08:00
Minko Gechev
b4b876c347
docs: update readme
2018-11-25 17:56:04 -08:00
chavacava
4bb1b4d361
Merge branch 'master' of https://github.com/chavacava/revive
...
Conflicts:
config.go
2018-11-12 15:20:30 +01:00
SalvadorC
47d2b15cf9
Merge pull request #92 from jamesmaidment/fix-line-length-doc
...
Fix spelling of length (Closes #91 , related to #93 )
2018-11-06 07:09:04 +01:00
SalvadorC
623ef04eb0
Merge pull request #93 from xuri/miscellaneous
...
Doc updated: fix typo (see #91 and #92 )
2018-11-06 07:07:17 +01:00
xuri
9fccf1407f
Doc updated: fix typo
2018-11-06 10:28:24 +08:00
James Maidment
6b24cd60a8
Fix spelling of length
2018-11-05 17:41:25 -05:00
mgechev
26ec4a5367
ci: update travis scripts
2018-10-31 12:55:27 -07:00
SalvadorC
55fe366696
call-to-gc (new rule) ( #90 )
2018-10-31 07:32:23 -07:00
mgechev
ad7df7dc37
ci: remove apt install
2018-10-30 16:35:41 -07:00
mgechev
46944678f0
ci: update travis config
2018-10-30 16:32:27 -07:00
mgechev
7391637be6
ci: update deployment script
2018-10-30 16:27:32 -07:00
mgechev
1eba0c6f7b
ci: update deployment script
2018-10-30 16:16:17 -07:00
mgechev
2020b30eef
feat: add links to rules in formatters
...
This PR introduces:
- A new formatter called "plain" which produces the same output as "default" but also appends link to the rule
- The "friendly" and "stylish" formatters now have URLs to the rules instead of the rule names
- Update of the README, adding the "unix" and "plain" formatters
2018-10-30 16:07:32 -07:00
mgechev
376425d517
refactor: remove URL field from the failure struct
2018-10-30 15:37:27 -07:00
mgechev
7845c8af5a
infra: update commit message
2018-10-30 15:27:44 -07:00
mgechev
a3410192a6
infra: update git settings
2018-10-30 15:24:34 -07:00
mgechev
15e9397722
infra: update dir name
2018-10-30 15:19:49 -07:00
mgechev
33a4e4354c
infra: introduce auto docs deployment
2018-10-30 15:17:49 -07:00
mgechev
240d9ef0b2
Optimize the logo
2018-10-30 12:59:24 -07:00
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