-
Notifications
You must be signed in to change notification settings - Fork 7
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: adding preamble_comment lint rule #32
feat: adding preamble_comment lint rule #32
Conversation
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.
@adthrasher please weigh in, but I'm thinking everywhere this PR says header
should be updated to preamble
so that we're consistent with the language adopted in #25 .
I coined the term "header comment" but I think before solidifying that in code we should pivot to calling them "preamble comments". Does that make sense?
I think we need to be careful here. For example in this text, |
Good catch that it will be more than a simple find and replace. But sounds like you're on board with the terminology change? Going forward, we're going to retire the term "header" and instead use "preamble". Besides some word smithing related to this change, the PR looks good to me. I requested @peterhuene as a reviewer to make sure I didn't miss anything on the Rust side of things. |
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.
From the Rust side of things, looks good 👍
Yes, I think that's a better approach moving forward. |
I updated the naming as I understood from the conversation above! I kept the condition disallowing the normal comments in the preamble as was not clear if the converse was decided. |
Co-authored-by: Andrew Thrasher <adthrasher@gmail.com>
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.
@adthrasher this looks good to me. We can go ahead and merge if you give the all clear.
Thanks a lot @simojoe ! We appreciate your contributions!
This pull request adds a new rule to
wdl
.preamble_comment
v1::W010
wdl-grammar
Verify that comments before (and only before) the version declaration start with a double pound sign.
The whitespace around the pound signs and the comment lines are checked in other rules.
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
).