Skip to content

Exclude per filename/path regex option #2033

Answered by BernieWhite
juju4 asked this question in Q&A
Discussion options

You must be logged in to vote

@juju4 Thanks for raising an issue. I think we can answer this one as a question so I've move it here so that it might help others in the community.

I believe the option you are looking for is Input.PathIgnore.

This option uses the same format as a git path spec, which is not strictly a regular expression but should meet most requirements.

For example:

input:
  pathIgnore:
  - invalidjson.json
  - *tmp*
  - *.md
  - *.png

Which also means you can do this:

input:
  pathIgnore:
  # Remove all files
  - '*'
  # Add back files that are interesting
  - '!**/deploy.bicep'

Another example is here: https://azure.github.io/PSRule.Rules.Azure/using-bicep/#using-parameter-files


Is this what you are…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@juju4
Comment options

@BernieWhite
Comment options

@juju4
Comment options

Answer selected by BernieWhite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2031 on February 12, 2023 03:22.