-
Notifications
You must be signed in to change notification settings - Fork 94
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: Control Rules #5052
Comments
Note that it is not really possible to support the first indentation scheme in the issue as this would require a stateful linter but we have gone with a regex based approach. Suggest: allowing the indentation rule to be turned off (any linter should allow rules to be selectively disabled IMO) and leaving it there. |
Can I propose another possible solution? Black allows ignoring sections of code, via |
@hdyson I'd prefer not to litter workflows with extra directives. We've had a bit of a discussion at team meeting and came to the conclusion that a) We need to fix the index numbers of at least the style errors so that they remain consistent over time. |
#5055 provides items a and b. Item c will take a little more work, but: Proposal for linterLinter should be configurable on a per-workflow basis using a TOML file in the following format:
Why TOML?Simpler than YAML, easy to configure and parse. |
Note that isn't a toml parser in the standard library so this will involve adding a dependency (until pep0680). The new "standard" way to configure tooling for Python projects is in a pyproject.toml file e.g. https://github.com/cylc/cylc-uiserver/blob/master/pyproject.toml. |
Description
Some style rules (such as jinja2 indentation) are widely and (perhaps) understandably violated -
This seems as legit
as
Which according to the rules is correct.
Possible solutions
Pull requests welcome!
The text was updated successfully, but these errors were encountered: