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

excluded path #53

Closed
Raffaello opened this issue Jun 21, 2017 · 5 comments
Closed

excluded path #53

Raffaello opened this issue Jun 21, 2017 · 5 comments

Comments

@Raffaello
Copy link

Raffaello commented Jun 21, 2017

it would be nice to also have an excluded path for eg:
given this directories:

|
|  - yaml_files
|  |  - subdir1
|  |  - ....
|  |  - subdirN   
|  |  - wanted_excuded_subdir

normally you should iterate on all N subdirs or creating a bash script filtering out the excluded dir(s).

so strictly cannot be run simple as yamllint yaml_files
but need to be expanded in something similar as cd yaml_files && yamllint subdir1 ... subdirN
or using gnu find

it would be a lot simpler have a sort of excluded path option eg:
yamllint --exclude-path yaml_files/wanted_excluded_subdir yam_files

or in short just matching a regExp in the path
yamllint --excluded-path wanted_excluded yam_files

@adrienverge
Copy link
Owner

Hi @Raffaello,

Can you test the in-progress feature described at #43 (comment) and implemented on the feat/ignore-paths branch, and tell us if it suits your needs?

@Raffaello
Copy link
Author

i will have a look later for now i am doing a solution using gnu find, still not sure if it is working for a CI pipeline lint step check for the return codes.
but it is something like:
find yaml_files -path wanted_excluded_subdir -prune -o -name *.yml -exec yamlint {} \;

@Raffaello
Copy link
Author

Raffaello commented Jun 21, 2017

@adrienverge the ignore: key feature is what i am asking here for!! good one! i think we can close this as a duplicate.

@Raffaello
Copy link
Author

related / same feature as this branch:
https://github.com/adrienverge/yamllint/tree/feat/ignore-paths

@Raffaello
Copy link
Author

btw a similar solution reported here is what i needed:
#43 (comment)

i am closing.
thank you! :)

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

2 participants