-
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: adds check for tasks with no runtime block #10
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.
Here are some thoughts on the code and a few more thoughts outside of that.
- We discussed it internally, and we good with this lint being standalone. There is also the concept that some of the runtime keys should be specified (for instance,
container
is almost certainly required to be portable). Rather than pushing for that to be included in this lint, we propose that we make a separate lint later on that addresses these—that way, users can configure separately whether they want to check forruntime
blocks (almost always) versus what particular keys they want to enforce checking. - Sadly, I think
runtime
is going away in WDL 1.2. So it's just worth noting that, when we do end up updating to 1.2, this lint may actually need to change to a deprecation warning forruntime
and a new one will need to take it's place for the new keys. - If you would, go ahead and squash down your changes into one commit so I can see what the final commit added to the history will be. This will require a force push to your branch.
Also, I will just note here for myself: we need to add a |
Co-authored-by: Clay McLeod <3411613+claymcleod@users.noreply.github.com>
Co-authored-by: Clay McLeod <3411613+claymcleod@users.noreply.github.com>
Co-authored-by: Clay McLeod <3411613+claymcleod@users.noreply.github.com>
Co-authored-by: Clay McLeod <3411613+claymcleod@users.noreply.github.com>
Agreed, more granular lint checks help with configurable checking and can give better messages and fix suggestions
Yes, it will be deprecated and replaced with
Will do! |
This feature had the following commit messages that were squashed. * adds toolchain.toml for nightly channel * adds test for tasks with no runtime block * revise: updates rule number * feat: adds missing_runtime_block rule * revise: applies cargo fmt * revise: fixes doc test after addition of new rule * revise: adds new concerns for missing runtime block * Update RULES.md * Update wdl-grammar/src/v1/lint/missing_runtime_block.rs * revise: adjusts warning message Co-authored-by: Clay McLeod <3411613+claymcleod@users.noreply.github.com>
This feature had the following commit messages that were squashed. * adds toolchain.toml for nightly channel * adds test for tasks with no runtime block * revise: updates rule number * feat: adds missing_runtime_block rule * revise: applies cargo fmt * revise: fixes doc test after addition of new rule * revise: adds new concerns for missing runtime block * Update RULES.md * Update wdl-grammar/src/v1/lint/missing_runtime_block.rs * revise: adjusts warning message Co-authored-by: Clay McLeod <3411613+claymcleod@users.noreply.github.com>
This feature had the following commit messages that were squashed. * adds toolchain.toml for nightly channel * adds test for tasks with no runtime block * revise: updates rule number * feat: adds missing_runtime_block rule * revise: applies cargo fmt * revise: fixes doc test after addition of new rule * revise: adds new concerns for missing runtime block * Update RULES.md * Update wdl-grammar/src/v1/lint/missing_runtime_block.rs * revise: adjusts warning message Co-authored-by: Clay McLeod <3411613+claymcleod@users.noreply.github.com>
This pull request adds a new rule to
wdl
.missing_runtime_block
v1::W005
wdl-grammar
Describe the rules you have implemented and link to any relevant issues.
The rule will warn if a task doesn't contain a
runtime{}
block because this is likely to limit the portability of the task.Before submitting this PR, please make sure:
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.