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

6.17.0: exclude_paths not working for files with special characters in names #3530

Closed
osfrickler opened this issue Jun 2, 2023 · 1 comment
Assignees
Labels

Comments

@osfrickler
Copy link

osfrickler commented Jun 2, 2023

Summary

With 6.17.0 an excluded path like ./{{a}} is no longer excluded.

Issue Type
  • Bug Report
OS / ENVIRONMENT
$ ansible-lint --version
ansible-lint 6.17.0 using ansible-core:2.14.3 ruamel-yaml:0.17.26 ruamel-yaml-clib:0.2.7
  • ansible installation method: pip
  • ansible-lint installation method: pip
STEPS TO REPRODUCE

Have a broken yaml file named {{a}}/a.yml.

Have an .ansible_lint file with:

---
exclude_paths:
  - ./{{a}}
Desired Behavior

With ansible-lint<=6.16.1:

$ ansible-lint -c .ansible_lint 

Passed with production profile: 0 failure(s), 0 warning(s) on 0 files.
A new release of ansible-lint is available: 6.16.1 → 6.17.0 Upgrade by running: pip install --upgrade ansible-lint
CRITICAL Linter finished without analyzing any file, check configuration and arguments given.

(ansible-lint 6.16.2 didn't respect excluded_paths at all)

Actual Behavior
$ ansible-lint -c .ansible_lint 
WARNING  Listing 1 violation(s) that are fatal
load-failure[runtimeerror]: Failed to load YAML file
{{a}}/a.yml:1 mapping values are not allowed in this context
  in "<unicode string>", line 2, column 2


                    Rule Violation Summary                     
 count tag                        profile rule associated tags 
     1 load-failure[runtimeerror] min     core, unskippable    

Failed after : 1 failure(s), 0 warning(s) on 2 files.
@ssbarnea
Copy link
Member

I think that you should not be able to reproduce the bug with 6.17.1 and as I nodded, I think this might not be related to use of braces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants