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

[RFE] Allow marking lint jobs as nonfatal #170

Open
Qalthos opened this issue May 9, 2023 · 3 comments
Open

[RFE] Allow marking lint jobs as nonfatal #170

Qalthos opened this issue May 9, 2023 · 3 comments

Comments

@Qalthos
Copy link
Contributor

Qalthos commented May 9, 2023

see also ansible-network/github_actions#80
vyos/vyos.vyos#315 shows it in use

This might also be applicable to other scenarios, but particularly with ansible-lint, new rules may cause new errors that need not block all PRs as soon as they show up.

@cidrblock cidrblock changed the title Allow marking lint jobs as nonfatal [RFE} Allow marking lint jobs as nonfatal May 10, 2023
@cidrblock cidrblock changed the title [RFE} Allow marking lint jobs as nonfatal [RFE] Allow marking lint jobs as nonfatal May 10, 2023
@cidrblock
Copy link
Collaborator

If someone needs to run an environment but ignore the errors, I think what we can do is add a key to the [ansible] section of the ini, something like this:

[ansible]

ignore_errors=
         devel
         sanity-py3.10-2.9

when building the commands we could preface them with a -

at the same time we should probably add support for using a generative env_list

@cidrblock
Copy link
Collaborator

I should note that we don't currently generate an environment for running ansible-lint but I think that too would be a neat addition.

@greg-hellings
Copy link
Contributor

v1 had a lint_all target that ran yamllint, ansible-lint, and I think flake8, if memory serves correctly. It also provided a mechanism to pass command line arguments to each of those commands. If we are strictly going to reach feature parity, then we should plan to supply this.

However, it might be better to instead just point people towards using pre-commit and not force a particular set of lint commands. We could provide a default pre commit configuration and make sure that all of the tools support appropriate hooks.

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

No branches or pull requests

3 participants