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

feat: key-value pairs lint rule #141

Merged
merged 7 commits into from
Jul 31, 2024
Merged

feat: key-value pairs lint rule #141

merged 7 commits into from
Jul 31, 2024

Conversation

adthrasher
Copy link
Member

@adthrasher adthrasher commented Jul 25, 2024

This pull request adds a new rule to wdl-lint.

  • Rule Name: KeyValuePiars

This rule checks objects and arrays in meta and parameter_meta sections. It reports any that are on a single line. If already on multiple lines, it checks for missing newlines between elements. It also checks for indentation of each element and the closing delimiter.

Before submitting this PR, please make sure:

  • You have added a few sentences describing the PR here.
  • You have added yourself or the appropriate individual as the assignee.
  • You have added at least one relevant code reviewer to the PR.
  • Your code builds clean without any errors or warnings.
  • You have added an entry to the relevant CHANGELOG.md (see
    ["keep a changelog"] for more information).
  • Your commit messages follow the [conventional commit] style.

Rule specific checks:

  • You have added the rule as an entry within RULES.md.
  • You have added the rule to the rules() function in wdl-lint/src/lib.rs.
  • You have added a test case in wdl-lint/tests/lints that covers every
    possible diagnostic emitted for the rule within the file where the rule
    is implemented.
  • If you have implemented a new Visitor callback, you have also
    overridden that callback method for the special Validator
    (wdl-ast/src/validation.rs) and LintVisitor
    (wdl-lint/src/visitor.rs) visitors. These are required to ensure the new
    visitor callback will execute.
  • You have run wdl-gauntlet --refresh to ensure that there are no
    unintended changes to the baseline configuration file (Gauntlet.toml).
  • You have run wdl-gauntlet --refresh --arena to ensure that all of the
    rules added/removed are now reflected in the baseline configuration file
    (Arena.toml).

@adthrasher adthrasher self-assigned this Jul 25, 2024
@adthrasher adthrasher marked this pull request as ready for review July 25, 2024 17:05
wdl-lint/RULES.md Outdated Show resolved Hide resolved
wdl-lint/tests/lints/key-value-pairs/source.errors Outdated Show resolved Hide resolved
@adthrasher adthrasher requested a review from a-frantz July 29, 2024 15:19
@adthrasher adthrasher merged commit 7c1b5a3 into main Jul 31, 2024
8 checks passed
@adthrasher adthrasher deleted the feat/key_value_pairs branch July 31, 2024 18:54
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