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

Lint.hardcode style index numbers #5055

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Aug 11, 2022

Partially addresses #5052 -

  • Hardcodes the numbers for the Style fails
  • Adds the ability to ignore individual exception codes using --ignore or -n.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg and conda-environment.yml.
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • If this is a bug fix, PRs raised to both master and the relevant maintenance branch.

@wxtim wxtim self-assigned this Aug 11, 2022
@wxtim wxtim added the could be better Not exactly a bug, but not ideal. label Aug 11, 2022
@wxtim wxtim added this to the cylc-8.1.0 milestone Aug 11, 2022
@wxtim wxtim mentioned this pull request Aug 12, 2022
@wxtim wxtim force-pushed the lint.hardcode_style_index_numbers branch 2 times, most recently from 1e48ca0 to a6f71d7 Compare August 14, 2022 07:01
…drift in future

Added an --ignore/-n command to exclude style rules.

added testing for ignore
@wxtim wxtim force-pushed the lint.hardcode_style_index_numbers branch from a6f71d7 to 42269b5 Compare August 14, 2022 07:03
@MetRonnie MetRonnie requested review from datamel and removed request for hjoliver August 15, 2022 13:27
Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code read, checked out and manually tested removing valid and non valid code. Works well with a sensible error for non-valid code.
Thanks @wxtim.

@datamel
Copy link
Contributor

datamel commented Aug 16, 2022

Artifact upload failure is unrelated. Merging with two approvals.

@datamel datamel merged commit 6e84663 into cylc:master Aug 16, 2022
@wxtim wxtim deleted the lint.hardcode_style_index_numbers branch August 16, 2022 10:48
hjoliver pushed a commit to hjoliver/cylc-flow that referenced this pull request Aug 18, 2022
* Hardcoded error numbers for the style checks to prevent error number drift in future
Added an --ignore/-n command to exclude style rules.

added testing for ignore

* Update cylc/flow/scripts/lint.py

Co-authored-by: Ronnie Dutta <[email protected]>

Co-authored-by: Ronnie Dutta <[email protected]>
wxtim added a commit to wxtim/cylc that referenced this pull request Aug 18, 2022
* master:
  tui: add poll mutation (cylc#5075)
  bump dev version
  Add workflow field to ClientError, ClientTimeout
  Bump dev version
  Lint.hardcode style index numbers (cylc#5055)
  Wait for preparing tasks to submit before auto restart (cylc#5062)
  update changelog
  Prepare release 8.0.1
  scan: ignore FileNotFoundError (cylc#5065)
wxtim added a commit to wxtim/cylc that referenced this pull request Aug 26, 2022
* Hardcoded error numbers for the style checks to prevent error number drift in future
Added an --ignore/-n command to exclude style rules.

added testing for ignore

* Update cylc/flow/scripts/lint.py

Co-authored-by: Ronnie Dutta <[email protected]>

Co-authored-by: Ronnie Dutta <[email protected]>
wxtim added a commit to wxtim/cylc that referenced this pull request Oct 3, 2022
* Hardcoded error numbers for the style checks to prevent error number drift in future
Added an --ignore/-n command to exclude style rules.

added testing for ignore

* Update cylc/flow/scripts/lint.py

Co-authored-by: Ronnie Dutta <[email protected]>

Co-authored-by: Ronnie Dutta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants