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 - S011 no longer warns against 0{{a}} #5841

Conversation

ColemanTom
Copy link
Contributor

@ColemanTom ColemanTom commented Nov 23, 2023

Previously something like a = $((10#$foo)) {{ bar }} would trigger S011 in Cylc Lint, assuming that this was jinja after a comment. I've made it ignore this synatx. By ignoring this syntax there is of course a potential that #$ a real comment {{ jinja }} will be ignored, but I think it quite unlikely an edge case which would require making the regex more complex to work through.

This is not a perfect fix for #5682 but an improvement. Perhaps a sufficient enough fix that it can be closed though.

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).
  • N/A Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • N/A Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@MetRonnie MetRonnie added this to the cylc-8.2.4 milestone Nov 23, 2023
Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

Seems like a good approximation to a fix.

@oliver-sanders - Do you want to comment/review or shall we call this small and put it in with one review?

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

shell base arithmetic

Haven't come across that one before!

@oliver-sanders oliver-sanders merged commit b96a4d0 into cylc:8.2.x Nov 23, 2023
19 of 23 checks passed
wxtim added a commit to wxtim/cylc that referenced this pull request Dec 5, 2023
…at_runtime

* upstream/master:
  tui: avoid deprecated import (cylc#5858)
  Exclude broken pytest-asyncio version
  remove lint (cylc#5856)
  Async pipe decorator: preserve wrapped func signature
  Maintain order for CYLC_PYTHONPATH (cylc#5853)
  Update tests/integration/tui/conftest.py
  tests/i: fix flaky tui/test_updater tests (cylc#5849)
  tests/i: tui - attempt to stabilise tests
  Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11 (cylc#5851)
  tests/i: fix flaky tui/test_updater tests
  Improve changelog entries
  Fix bad TOML example in `cylc lint` docstring (cylc#5843)
  lint - S011 no longer warns against 0{{a}} (cylc#5841)
  `cylc lint`: add rule to catch `rose date`
  tui: show view
  tui: log view
  tui: tidy dangling interfaces
  tui: fix an obscure freezing issue
  tui: update screenshots
  Tui 1.0
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.

4 participants