* Yet more bad defer / recover patterns
`recover()` is an eternal font of excitement.
* demonstrating another flavor of failure
* removing leftover code
* update documentation
* removes test not related to the rule itself
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
* Check whether the tag name is duplicate or not
* - minor refactoring
- continues checking tag even if name is repeated
* adds test cases for duplicated tag names
* adds test case with two tag types (json & yaml)
* Fix allow the same tag name in different tag key
* fix checks on protobuf tag names
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
* Allow to customize user functions in rule `error-strings`
* Rollback the Available Rules table format in README
* adds memoization of the rule's configuration
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
Setting the entire file AST as the node causes golangci-lint to print
the entire file source as the context, and line and column numbers set
to 1. Point to the package name node instead.
Closes#688
* Fixes issue #619 imports-blacklist support regex
* refactors method name and error message
* restores original test cases
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
Noticed during migration from our heavily modified "go-lint" to "revive" that there is an additional line printed. I am unsure that the convention for this project is on this, we do not allow adding such a call.
* Separating lib from cli
* Renamed NewRevive to New
* Added GetLintFailures helper function
* Moved formatter to call to format since that's when it's needed
* makes fields of Revive struct non-public
* minor modifs in tests: remove unnamed constats
* Added lint package management to lint command
* README message for using revive as a library
* README formatting
* Removed unused method
* Slightly improved wording in README
* Handling format errors
* Renaming file to better reflect intent
* Refactoring pattern usage
* README heads
* renames excludePaths into excludePatterns
Co-authored-by: Bernardo Heynemann <bernardo.heynemann@coinbase.com>
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
This change allows revive to be called from main.go
in other libraries and pass in a list of custom
linters to be added to the built-in linters found in config
Co-authored-by: Bernardo Heynemann <bernardo.heynemann@coinbase.com>
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>