| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,10 +13,10 @@ rm -rf dbs | |||
| 13 | 13 | ||
| 14 | 14 | mkdir dbs | |
| 15 | 15 | ||
| 16 | - CODEQL_EXTRACTOR_PYTHON_DONT_EXTRACT_STDLIB=True $CODEQL database create dbs/without-stdlib --language python --source-root repo_dir/ | ||
| 16 | + $CODEQL database create dbs/without-stdlib --language python --source-root repo_dir/ | ||
| 17 | 17 | $CODEQL query run --database dbs/without-stdlib query.ql > query.without-stdlib.actual | |
| 18 | 18 | diff query.without-stdlib.expected query.without-stdlib.actual | |
| 19 | 19 | ||
| 20 | - LGTM_INDEX_EXCLUDE="/usr/lib/**" $CODEQL database create dbs/with-stdlib --language python --source-root repo_dir/ | ||
| 20 | + LGTM_INDEX_EXCLUDE="/usr/lib/**" CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB=True $CODEQL database create dbs/with-stdlib --language python --source-root repo_dir/ | ||
| 21 | 21 | $CODEQL query run --database dbs/with-stdlib query.ql > query.with-stdlib.actual | |
| 22 | 22 | diff query.with-stdlib.expected query.with-stdlib.actual | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,8 +102,10 @@ def make_parser(): | |||
| 102 | 102 | config_options.add_option("--colorize", dest="colorize", default=False, action="store_true", | |
| 103 | 103 | help = """Colorize the logging output.""") | |
| 104 | 104 | ||
| 105 | - config_options.add_option("--dont-extract-stdlib", dest="extract_stdlib", default=True, action="store_false", | ||
| 106 | - help="Do not extract the standard library.") | ||
| 105 | + config_options.add_option("--dont-extract-stdlib", dest="extract_stdlib", action="store_false", | ||
| 106 | + help="This flag is deprecated; not extracting the standard library is now the default.") | ||
| 107 | + config_options.add_option("--extract-stdlib", dest="extract_stdlib", default=False, action="store_true", | ||
| 108 | + help="Extract the standard library.") | ||
| 107 | 109 | ||
| 108 | 110 | parser.add_option_group(config_options) | |
| 109 | 111 | ||
@@ -226,8 +228,16 @@ def parse(command_line): | |||
| 226 | 228 | ||
| 227 | 229 | if 'CODEQL_EXTRACTOR_PYTHON_DONT_EXTRACT_STDLIB' in os.environ: | |
| 228 | 230 | options.extract_stdlib = False | |
| 231 | + print ("Warning: CODEQL_EXTRACTOR_PYTHON_DONT_EXTRACT_STDLIB is deprecated; the default is now to not extract the standard library.") | ||
| 232 | + | ||
| 233 | + if 'CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB' in os.environ: | ||
| 234 | + options.extract_stdlib = True | ||
| 229 | 235 | ||
| 230 | 236 | options.prune = True | |
| 237 | + | ||
| 238 | + if options.extract_stdlib: | ||
| 239 | + print ("Warning: The analysis will extract the standard library. This behavior is deprecated and will be removed in a future release. We expect it to be gone in CLI version 2.20.0.") | ||
| 240 | + | ||
| 231 | 241 | return options, args | |
| 232 | 242 | ||
| 233 | 243 | def split_and_flatten(options_list, div): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments