-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: adds the one_empty_line lint warning #33
feat: adds the one_empty_line lint warning #33
Conversation
Co-authored-by: Andrew Thrasher <adthrasher@gmail.com> Co-authored-by: Andrew Frantz <andrew.frantz@stjude.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me aside from what @adthrasher pointed out. I have the same question, but once that's resolved I give the all clear
Good point! Modify to actually tag the last infringing line. Since this warning requires as least two lines to report, this should always unwrap successfully. |
@a-frantz - This now reports the last problematic blank line. Do you think that is sufficient or should it flag every extra blank line? I was thinking something like this, so that every empty line would be flagged.
|
I would be happy modifying my PR as to fit the expectations. The one lint warning per block of erroneous empty lines design choice was defined in the original post as it was not previously defined in the description. The EOF check was not part of the PR? |
I made a change to report a As for the EOF, @a-frantz and I discussed it afterward and he pointed out your other PR for Thanks for your contributions, @simojoe! |
This pull request adds a new rule to
wdl
.one_empty_line
v1::W011
wdl-grammar
Parses the file line by line, trims whitespace and emits one warning per block of 2 or more continuous empty lines.
Before submitting this PR, please make sure:
CHANGELOG.md
(see"keep a changelog" for more information).
good, articulated reason as to why there shouldn be more than one).
Rule specific checks:
tables (
wdl-ast/src/v1.rs
for AST-based rules andwdl-grammar/src/v1.rs
for parse tree-based rules).table at
RULES.md
.fn rules()
.wdl-ast
should be added tofn rules()
withinwdl-ast/src/v1/validation.rs
.wdl-ast
should be added tofn rules()
withinwdl-ast/src/v1/lint.rs
.wdl-grammar
should be added tofn rules()
withinwdl-grammar/src/v1/validation.rs
.wdl-grammar
should be added tofn rules()
withinwdl-grammar/src/v1/lint.rs
.within the file where the rule is implemented.
wdl-gauntlet --save-config
to ensure that all of the rulesadded/removed are now reflected in the baseline configuration file
(
Gauntlet.toml
).