Investigate Input.IgnoreObjectSource bug
Open
Nobody has claimed this yet.
bug
feature: input
- Dominant language
- C#
- Stars
- 474
- Forks
- 65
- Avg merge
- 22h 25m
- Merged PRs (30d)
- 26
Description
Description of the issue
The option Input.IgnoreObjectSource is not working correcting with the following options:
input:
# By default, objects read from file using inputPath will be skipped if the file path has been ignored.
# When set to true, additionally objects with a source path that has been ignored will be skipped.
ignoreObjectSource: true
# By default, PSRule will process all files within an input path.
ignoreUnchangedPath: true
pathIgnore:
# Ignore other files in the repository.
- '**'
# Include deployment files.
- '!deployments/**/*.bicepparam'
- '!deployments/**/main.bicep'
Expected behaviour
All files should be ignored except *.bicepparam and main.bicep files.
Module in use and version:
- Module: PSRule
- Version: 2.9.0
Additional context
Related to Azure/PSRule.Rules.Azure#2678
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the YAML input configuration shown, using PSRule version 2.9.0 and the deployment paths described. Trace how Input.IgnoreObjectSource, ignoreUnchangedPath, and pathIgnore are applied, then verify that only *.bicepparam and main.bicep files are processed while all other files are skipped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100