Tags: ultraware/whitespace
Tags
Use go modules, analysis package and add test (#8) * Use go modules, analysis package and add test * Use go modules * Use `analysis.Analyzer` for the linter * Introduce running mode to use from `golangci-lint` * Add tests using the testing package and assert fixer * Add standalone linter (`cmd/whitespace`) * Fix comments and typos, add another test * Add GitHub actions * Make linter work on non formatted files Instead of relying on the file being `gofmt`:ed and only containing one empty line at most this commit will keep track of comments after the opening bracket of block statements and set the fix start to where this comment ends. This means that we will fix all the way from the left bracket or comment til the first statement no matter how many empty lines this is. This will also keep a list of lines affected by the linter to support fixing multiple empty lines in `golangci-lint`. * Fix typos, add tests from PR * Multiline comments ending after opening pos is ok * Fix typo