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

Add an option to exclude and include specific paths before scanning 🦝 #232

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

jamacku
Copy link
Member

@jamacku jamacku commented Apr 5, 2023

  • New option exclude-path. Allows to specify list of paths excluded from ShellCheck scanning. It supports globbing and brace expansion. e.g. test/{test1,test2}/**
  • New option include-path. Similar to exclude-path, it allows specifying the list of paths that will be included into scanning. No further checks are performed.
    It supports globbing and brace expansion. e.g. fixture/**.fixture

Still missing:

  • support for brace expansion {*,**}

TODO:

  • tests
  • changelog
  • documentation

test/is_matched_by_exclude_path.bats Fixed Show fixed Hide fixed
test/is_matched_by_exclude_path.bats Fixed Show fixed Hide fixed
test/is_matched_by_exclude_path.bats Fixed Show fixed Hide fixed
test/is_matched_by_exclude_path.bats Fixed Show fixed Hide fixed
test/is_matched_by_exclude_path.bats Fixed Show fixed Hide fixed
test/is_matched_by_exclude_path.bats Fixed Show fixed Hide fixed
test/is_matched_by_exclude_path.bats Fixed Show fixed Hide fixed
test/is_matched_by_exclude_path.bats Fixed Show fixed Hide fixed
@jamacku jamacku force-pushed the exclude-include branch 7 times, most recently from 2a9aa3a to 678fe9e Compare April 6, 2023 07:31
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #232 (8535f8b) into main (b13b453) will increase coverage by 0.76%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
+ Coverage   81.56%   82.33%   +0.76%     
==========================================
  Files           4        4              
  Lines         255      266      +11     
==========================================
+ Hits          208      219      +11     
  Misses         47       47              
Impacted Files Coverage Δ
src/functions.sh 84.81% <100.00%> (+1.13%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

It allows specifying the list of paths excluded from ShellCheck scanning.
It supports globbing and brace expansion. e.g. `test/{test1,test2}/**`

Co-authored-by: Kamil Dudka <kdudka@redhat.com>
@jamacku jamacku marked this pull request as ready for review April 6, 2023 07:47
@jamacku jamacku requested a review from lzaoral April 6, 2023 07:47
@jamacku
Copy link
Member Author

jamacku commented Apr 6, 2023

@lzaoral Could you please have a look? Thank you.

@jamacku jamacku changed the title Add an option to exclude specific paths from scanning 🦝 Add an option to exclude or include specific paths 🦝 Apr 6, 2023
@jamacku jamacku changed the title Add an option to exclude or include specific paths 🦝 Add an option to exclude and include specific paths before scanning 🦝 Apr 6, 2023
@jamacku jamacku marked this pull request as draft April 6, 2023 10:51
@jamacku jamacku marked this pull request as ready for review April 6, 2023 11:03
It allows specifying the list of paths that will be included into scanning.
No further checks are performed.
@jamacku jamacku linked an issue Apr 6, 2023 that may be closed by this pull request
@jamacku jamacku merged commit af7a517 into redhat-plumbers-in-action:main Apr 6, 2023
9 checks passed
@jamacku jamacku deleted the exclude-include branch April 6, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant