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

cylc lint - ability to return non-zero code when warnings raised? #5545

Closed
ColemanTom opened this issue May 16, 2023 · 0 comments · Fixed by #5546
Closed

cylc lint - ability to return non-zero code when warnings raised? #5545

ColemanTom opened this issue May 16, 2023 · 0 comments · Fixed by #5546
Assignees
Labels
could be better Not exactly a bug, but not ideal.
Milestone

Comments

@ColemanTom
Copy link
Contributor

Problem

cylc lint always returns a 0 return code. When running a linter using pre-commit or via CI pipelines, cylc lint would hopefully return a non-zero return code so the linting will fail and raise an alert. To work around this, we could capture stdout and check for any error messages, and if there are, print them out and fail, but it's not optimal.

Proposed Solution

Add a flag to the CLI to fail on warning.

@oliver-sanders oliver-sanders added this to the cylc-8.2.0 milestone May 16, 2023
@oliver-sanders oliver-sanders assigned wxtim and ColemanTom and unassigned wxtim May 16, 2023
@oliver-sanders oliver-sanders modified the milestones: cylc-8.2.0, cylc-8.1.5 May 16, 2023
@MetRonnie MetRonnie added the could be better Not exactly a bug, but not ideal. label May 17, 2023
@MetRonnie MetRonnie linked a pull request May 18, 2023 that will close this issue
7 tasks
@hjoliver hjoliver modified the milestones: cylc-8.1.5, cylc-8.2.0 Jun 12, 2023
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 a pull request may close this issue.

5 participants