Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip lines with #noqa comment #81

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mnojek
Copy link

@mnojek mnojek commented Jul 1, 2020

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.

rflint/rflint.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants