-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow wildcards in .uccignore file (#1012)
Currently it is not possible to put wildcards in the .uccignore file, this can be problematic if you do not know the exact filename that needs to be ignored, for example a developer may be developing a TA on a Mac which could create darwin related binaries in the lib/<packageName> folder. Other "ignore" files, such as .gitignore and .dockerignore allow for wildcards and therefore developers may expect that same with uccignore. .uccignore: ``` ... lib/**/*darwin*.so ``` Before: ``` ... WARNING: While ignoring the files mentioned in .uccignore '<projectDir>/output/<appName>/lib/**/*darwin*.so was not found INFO: Removed ['<otherRemovedFile>', '<projectDir>/output/<appName>/lib/**/*darwin*.so'] files ... ``` Note, in the above it does not expand the wildcards, the WARNING says that there was no match, however the INFO contradicts and suggests that it has been removed (which it has not). After: ``` ... INFO: Removed ['<projectDir>/output/<appName>/lib/_cffi_backend.cpython-39-darwin.so', '<projectDir>/output/<appName>/lib/charset_normalizer/md__mypyc.cpython-39-darwin.so', '<projectDir>/output/<appName>/lib/charset_normalizer/md.cpython-39-darwin.so'] files ... ``` Note: The list of removed files is now representative of what was removed, rather than the wildcard, so the developer can see exactly what has been ignored/removed. This also fixes #1011 --------- Co-authored-by: sgoral <sgoral@splunk.com>
- Loading branch information
1 parent
afee511
commit 04b847f
Showing
17 changed files
with
1,688 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/testdata/test_addons/package_global_config_everything_uccignore/.uccignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/**one.py | ||
|
||
bin/splunk_ta_uccexample_rh_example_input_two.py | ||
bin/wrong_pattern |
1 change: 1 addition & 0 deletions
1
...s/testdata/test_addons/package_global_config_everything_uccignore/LICENSES/Apache-2.0.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dummy apache license |
Oops, something went wrong.