robotframework-lint
robotframework-lint copied to clipboard
Skip lines with #noqa comment
I find it very useful to have a feature to omit by linter the lines containing specific comment just like it works in pylama. The regex pattern is taken from pylama project — it's simple and works properly.
By putting a comment starting with noqa it is possible now to ignore these lines by linter. The problem is that some rules that report the issues on the first line of the element (keyword's name or test case's title) will not be displayed. Because of that I fixed TagWithSpaces rule to report the issue on the line where the tag appears and not on the line of the test case title. There may be some other rules that report wrong line number but it's the problem of the rule itself, not the feature.
I tried to implement the same feature here. Added also some test cases that verifies that it works well.