File tree 7 files changed +37
-0
lines changed
7 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ | name |
2
+ +-------------------------------+
3
+ | .hidden_file.py |
4
+ | foo.py |
5
+ | visible_file_in_hidden_dir.py |
Original file line number Diff line number Diff line change
1
+ | name |
2
+ +-----------------+
3
+ | .hidden_file.py |
4
+ | foo.py |
Original file line number Diff line number Diff line change
1
+ import python
2
+
3
+ select any ( File f ) .getShortName ( ) as name order by name
Original file line number Diff line number Diff line change
1
+ print (42 )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
4
+
5
+ set -x
6
+
7
+ CODEQL=${CODEQL:- codeql}
8
+
9
+ SCRIPTDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
10
+ cd " $SCRIPTDIR "
11
+
12
+ rm -rf db db-skipped
13
+
14
+ # Test 1: Default behavior should be to extract files in hidden directories
15
+ $CODEQL database create db --language python --source-root repo_dir/
16
+ $CODEQL query run --database db query.ql > query-default.actual
17
+ diff query-default.expected query-default.actual
18
+
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
21
+ $CODEQL query run --database db-skipped query.ql > query-skipped.actual
22
+ diff query-skipped.expected query-skipped.actual
23
+
24
+ rm -rf db db-skipped
You can’t perform that action at this time.
0 commit comments