Fix linting errors

This commit is contained in:
Rasmus Wriedt Larsen 2023-05-12 09:58:30 +02:00
parent cbc79bf64b
commit c237da1a2f
No known key found for this signature in database

View file

@ -80,20 +80,23 @@ export interface QueriesStatusReport {
analyze_failure_language?: string; analyze_failure_language?: string;
} }
async function setupPythonExtractor(logger: Logger, features: FeatureEnablement, codeql: CodeQL) { async function setupPythonExtractor(
logger: Logger,
features: FeatureEnablement,
codeql: CodeQL
) {
const codeqlPython = process.env["CODEQL_PYTHON"]; const codeqlPython = process.env["CODEQL_PYTHON"];
if (codeqlPython === undefined || codeqlPython.length === 0) { if (codeqlPython === undefined || codeqlPython.length === 0) {
// If CODEQL_PYTHON is not set, no dependencies were installed, so we don't need to do anything // If CODEQL_PYTHON is not set, no dependencies were installed, so we don't need to do anything
return; return;
} }
if (await features.getValue( if (
Feature.DisablePythonDependencyInstallation, await features.getValue(Feature.DisablePythonDependencyInstallation, codeql)
codeql ) {
)) {
logger.warning( logger.warning(
"Library extraction is disabled now. Please remove your logic that sets the CODEQL_PYTHON environment variable." + "Library extraction is disabled now. Please remove your logic that sets the CODEQL_PYTHON environment variable." +
"\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7 or CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11." "\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7 or CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11."
); );
return; return;
} }