Skip to content

Commit 96558b5

Browse files
committed
Python: Update test
The second test case now sets the `paths-ignore` setting in the config file in order to skip files in hidden directories.
1 parent 98388be commit 96558b5

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: Test Config
2+
paths-ignore:
3+
- "**/.*/**"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
| name |
22
+-------------------------------+
33
| .hidden_file.py |
4+
| another_non_hidden.py |
45
| foo.py |
56
| visible_file_in_hidden_dir.py |

python/extractor/cli-integration-test/hidden-files/repo_dir/.hidden_dir/internal_non_hidden/another_non_hidden.py

Whitespace-only changes.

python/extractor/cli-integration-test/hidden-files/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ $CODEQL database create db --language python --source-root repo_dir/
1616
$CODEQL query run --database db query.ql > query-default.actual
1717
diff query-default.expected query-default.actual
1818

19-
# Test 2: Setting the relevant extractor option to true skips files in hidden directories
20-
$CODEQL database create db-skipped --language python --source-root repo_dir/ --extractor-option python.skip_hidden_directories=true
19+
# Test 2: The default behavior can be overridden by setting `paths-ignore` in the config file
20+
$CODEQL database create db-skipped --language python --source-root repo_dir/ --codescanning-config=config.yml
2121
$CODEQL query run --database db-skipped query.ql > query-skipped.actual
2222
diff query-skipped.expected query-skipped.actual
2323

0 commit comments

Comments
 (0)