Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasmus Wriedt Larsen committed May 12, 2023
1 parent cbc79bf commit c237da1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,23 @@ export interface QueriesStatusReport {
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"];
if (codeqlPython === undefined || codeqlPython.length === 0) {
// If CODEQL_PYTHON is not set, no dependencies were installed, so we don't need to do anything
return;
}

if (await features.getValue(
Feature.DisablePythonDependencyInstallation,
codeql
)) {
if (
await features.getValue(Feature.DisablePythonDependencyInstallation, codeql)
) {
logger.warning(
"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;
}
Expand Down

0 comments on commit c237da1

Please sign in to comment.