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

Import sorting and fix message changes requested in #263 #332

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Pabsthegreat
Copy link

Modifying a linting rule: ImportSort

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

  • Rule Name: ImportSort

This PR addresses the changes requested in the issue #263, ensures that import statements in WDL files are sorted lexicographically and given to user when 'import not sorted error' occurs, to improve readability and maintain consistency.

Changes in this PR:

  • Implemented ImportSortRule to check import sorting and flag errors if imports are out of order.
  • Added a diagnostic to suggest correct order when sorting violations occur.
  • Prevented inline comments within import statements, as per best practices.

Checklist Before Merging:

  • cargo check and cargo test works

Rule-Specific Checklist:

  • I was not able to run checks as i was unable to get a clean 'cargo test --all-features' output, I request one of the members to review the changes and attempt compiling. 'cargo check', 'cargo test' run alright.

Additional Notes:

This PR introduces a lint rule to ensure import consistency in WDL workflows. Future improvements could include customizable sorting preferences if needed by users.

@Pabsthegreat
Copy link
Author

@claymcleod @peterhuene could you review this and check if it works? Thanks!

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.

1 participant