Skip to content
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

Analyze: Improve log grouping and log the analysis summary in its own group #515

Merged
merged 5 commits into from
May 20, 2021

Conversation

adityasharad
Copy link
Contributor

@adityasharad adityasharad commented May 20, 2021

  • Fix grouping of the analysis logs, so that custom query logs and the upload steps also get grouped. (Bug spotted by @AlonaHlobina.)
  • Capture the stdout of codeql database analyze, which contains the analysis summary from summary and diagnostic queries. Log this output in its own group, along with the baseline metrics computed in the Action.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

Fix grouping of the analysis logs, so that custom query logs also get grouped.
Capture the stdout of codeql database analyze, which contains the analysis summary
from summary and diagnostic queries.
Log this output in its own group, along with the baseline computed in the Action.
src/codeql.ts Outdated Show resolved Hide resolved
src/analyze.ts Show resolved Hide resolved
As produced by npm ci && npm run removeNPMAbsolutePaths.
@adityasharad adityasharad merged commit 8fa2ef8 into github:main May 20, 2021
This was referenced May 21, 2021
@@ -717,7 +717,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
await new toolrunner.ToolRunner(cmd, args, {
listeners: {
stdout: (data: Buffer) => {
output += data.toString();
output += data.toString("utf8");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adityasharad Is CodeQL guaranteed to output UTF-8 ? Doesn't it output things in the "system" encoding to make sure things render correctly when running in a non-UTF-8 terminal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, it uses the Java default, so that's a little harder to anticipate here. Is it better to just avoid passing in a locale?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants