mirror of
https://github.com/mgechev/revive.git
synced 2025-11-23 22:04:49 +02:00
Handle multi-line statements edge-cases in the multi-line rule (#83)
There were many cases where the multi-line statements at the end of a block were marked as containing empty lines, while they didn't. Or vice versa.
This commit is contained in:
committed by
Minko Gechev
parent
69f012a7d9
commit
04516d2f82
@@ -82,7 +82,7 @@ func (w lintEmptyLines) checkEnd(block *ast.BlockStmt) {
|
||||
return
|
||||
}
|
||||
|
||||
last := w.position(lastNode.Pos())
|
||||
last := w.position(lastNode.End())
|
||||
if end.Line-last.Line > 1 {
|
||||
w.onFailure(lint.Failure{
|
||||
Confidence: 1,
|
||||
|
||||
Reference in New Issue
Block a user