Skip to content

Autobuild Go in analyze if not already built #1219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Sep 2, 2022
Prev Previous commit
Next Next commit
Simplify doesGoExtractionOutputExist implementation
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
  • Loading branch information
henrymercer and aeisenberg committed Aug 31, 2022
commit e466e758751bb2b26e0dee9b3432dc3ea9b478f0
8 changes: 2 additions & 6 deletions lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 8 additions & 12 deletions src/analyze-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const pkg = require("../package.json");

interface AnalysisStatusReport
extends upload_lib.UploadStatusReport,
QueriesStatusReport {}
QueriesStatusReport { }

interface FinishStatusReport
extends actionsUtil.StatusReportBase,
actionsUtil.DatabaseCreationTimings,
AnalysisStatusReport {}
actionsUtil.DatabaseCreationTimings,
AnalysisStatusReport { }

interface FinishWithTrapUploadStatusReport extends FinishStatusReport {
/** Size of TRAP caches that we uploaded, in bytes. */
Expand Down Expand Up @@ -71,9 +71,9 @@ export async function sendStatusReport(
...statusReportBase,
...(config
? {
ml_powered_javascript_queries:
util.getMlPoweredJsQueriesStatus(config),
}
ml_powered_javascript_queries:
util.getMlPoweredJsQueriesStatus(config),
}
: {}),
...(stats || {}),
...(dbCreationTimings || {}),
Expand Down Expand Up @@ -106,15 +106,11 @@ function hasBadExpectErrorInput(): boolean {
*/
function doesGoExtractionOutputExist(config: Config): boolean {
const golangDbDirectory = util.getCodeQLDatabasePath(config, Language.go);
const extractedFiles = fs
return fs
.readdirSync(golangDbDirectory)
.filter(
.some(
(fileName) => fileName.endsWith(".trap") || fileName.endsWith(".trap.gz")
);
if (extractedFiles.length !== 0) {
return true;
}
return false;
}

async function run() {
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy