1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-15 01:04:40 +02:00
Commit Graph

277 Commits

Author SHA1 Message Date
22b849f286 docs: update the list of contributors 2019-05-04 19:35:21 -06:00
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
dbcb21608a added sklearn to "Who uses revive" (#126)
added line
- [`sklearn`](https://github.com/pa-m/sklearn) - A partial port of scikit-learn written in Go
2019-04-28 20:07:52 -07:00
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
e8c1baf8ac optimizes import-blacklist (#123) 2019-04-22 10:58:02 -07:00
2474f6cecb simpler and more efficient implementation of unused-parameter (#121) 2019-04-21 10:13:03 -07:00
015086ddac docs: update sample projects 2019-04-19 17:56:36 -07:00
edfee04f38 docs: update list of projects using revive 2019-04-19 17:53:01 -07:00
00a86ae1fd new rule: unused-receiver (#119)
* new rule: unused-receiver

* unused-receiver: adds more test cases
2019-04-18 10:35:51 -07:00
4c0c2b62da docs: update the list of contributors 2019-04-18 07:02:50 -07:00
745bcf65aa bare-return (first working version) (#117)
New rule bare-return
2019-04-17 22:55:52 +02:00
796760d728 Mention grafana in "Who uses Revive" block (#116) 2019-04-16 09:16:13 +02:00
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
a307792228 docs: update the list of contributors 2019-03-21 09:31:01 -07:00
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
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
6a62ee9f02 Update the list of contributors 2019-03-01 11:45:22 -08:00
202adf0786 Fix 102 (#103)
Do not require additional newline for disabling multiple rules
2019-01-24 09:14:43 -08:00
e2acdb0e10 Merge pull request #101 from mapreal19/patch-1
Adds missing `rule` in rules examples
2019-01-21 15:22:34 +01:00
d775d613d0 Adds missing rule in rules examples 2019-01-21 14:25:14 +01:00
c878d3090d fixes issue #98 (#99) 2019-01-18 07:33:40 -08:00
b4cc152955 Add excelize and aurora to "Who uses Revive" (#96) 2018-12-10 06:05:14 -08:00
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
1338c47ef1 Update README.md (#95) 2018-12-04 08:42:55 -08:00
b4b876c347 docs: update readme 2018-11-25 17:56:04 -08:00
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
623ef04eb0 Merge pull request #93 from xuri/miscellaneous
Doc updated: fix typo (see #91 and #92)
2018-11-06 07:07:17 +01:00
9fccf1407f Doc updated: fix typo 2018-11-06 10:28:24 +08:00
6b24cd60a8 Fix spelling of length 2018-11-05 17:41:25 -05:00
26ec4a5367 ci: update travis scripts 2018-10-31 12:55:27 -07:00
55fe366696 call-to-gc (new rule) (#90) 2018-10-31 07:32:23 -07:00
ad7df7dc37 ci: remove apt install 2018-10-30 16:35:41 -07:00
46944678f0 ci: update travis config 2018-10-30 16:32:27 -07:00
7391637be6 ci: update deployment script 2018-10-30 16:27:32 -07:00
1eba0c6f7b ci: update deployment script 2018-10-30 16:16:17 -07:00
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
376425d517 refactor: remove URL field from the failure struct 2018-10-30 15:37:27 -07:00
7845c8af5a infra: update commit message 2018-10-30 15:27:44 -07:00
a3410192a6 infra: update git settings 2018-10-30 15:24:34 -07:00
15e9397722 infra: update dir name 2018-10-30 15:19:49 -07:00
33a4e4354c infra: introduce auto docs deployment 2018-10-30 15:17:49 -07:00
240d9ef0b2 Optimize the logo 2018-10-30 12:59:24 -07:00
1dbda0e473 Merge pull request #88 from mgechev/minko/update-docs
docs: update the documentation
2018-10-26 07:48:50 +02:00
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
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
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
4b3d324865 docs: update the list of contributors 2018-10-17 10:07:33 -07:00
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
3cae2fa6f9 Update empty-lines.go
removes warning on unused parameter
2018-10-13 20:13:29 +02:00
b7d9bce0b6 Fix the same-line comments detection in the empty-lines rule
Fixes #84.
2018-10-13 09:47:29 -07:00