* adds support for comments when enabling/disabling
* adds config flag to require disabling reason
* Update lint/file.go
adds code fmt suggestion by @mgechev
Co-Authored-By: Minko Gechev <mgechev@gmail.com>
* moves regexp compilation out of the function
fix typo in condition
* adds support for comments when enabling/disabling
* skips incomplete directives and generate a failure
* adds _directive_ concept to cope with specify-disable-reason
* adds doc
gofmt
* fixes severity is ignored
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
* 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`
* 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
* 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
* 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
* 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