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

exclude_paths no longer properly works #1311

Closed
felixfontein opened this issue Feb 7, 2021 · 1 comment · Fixed by #1313
Closed

exclude_paths no longer properly works #1311

felixfontein opened this issue Feb 7, 2021 · 1 comment · Fixed by #1313
Assignees
Labels
Milestone

Comments

@felixfontein
Copy link
Contributor

Summary

This was caused by 4faa359.

There seem to be three different bugs:

  1. Runner.is_excluded no longer works, since it does not convert its input paths to absolute paths, and now it no longer always gets absolute paths.
  2. While get_lintables() properly processes exclude_paths, the excluded files are sometimes added back in by expand_dirs_in_lintables().
  3. There must be a third bug, because if I comment out expand_dirs_in_lintables(), it still checks these files.

Fixing 1. resolves the issue, but only hides 2. (and might or not might solve 3. - that depends on what 3. actually is).

Issue Type
  • Bug Report
Ansible and Ansible Lint details

Happens with master branch, and latest alpha release.

STEPS TO REPRODUCE

Run ansible-lint in https://github.com/felixfontein/ansible-acme/: https://github.com/felixfontein/ansible-acme/runs/1847849117?check_suite_focus=true

roles/acme_certificate/tasks/dns-ns1-cleanup.yml and roles/acme_certificate/tasks/dns-ns1-create.yml are in exclude_paths in .ansiblelint, but errors in them are reported.

@ssbarnea ssbarnea added this to the 5.0.0 milestone Feb 7, 2021
@ssbarnea ssbarnea self-assigned this Feb 7, 2021
@ssbarnea
Copy link
Member

ssbarnea commented Feb 7, 2021

As we have multiple places that can increase the effective list of files producing matches I think it would be better to perform a filtering-out of exclusions just before we report the errors, so we avoid missing errors coming from other places.

Thanks for testing on master, this bug counts as release blocker and I am already working on a fix.

ssbarnea added a commit that referenced this issue Feb 7, 2021
ssbarnea added a commit that referenced this issue Feb 7, 2021
ssbarnea added a commit that referenced this issue Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants