Some of the formatters were writing directly to stdout instead of returning the output. That made them more difficult to use them with revivelib. This PR updates those formatters to write to a buffer and return the resulting string.
* 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