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

Show lines of code data in debug mode only #15874

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Mar 11, 2024

The new file coverage metrics are available in all supported GHES versions. This PR tags lines of code queries as debug. This means that lines of code information will only be shown in the logging output of the CLI when running at higher verbosities (including the CodeQL Action debug mode). Lines of code information will also still be available in the SARIF file.

The one exception is the metric queries for Java/Kotlin that provides separate lines of code information for Java and Kotlin. I've left these as non-debug level since separate file coverage information for languages like Java and Kotlin is only available for GHES 3.12 and later.

The new file coverage metrics are available in all supported GHES
versions. This PR tags lines of code queries as telemetry queries. Lines
of code information will still be available in the SARIF file, but it
will no longer be displayed in the logging output of the CLI.

The one exception is the metric queries for Java/Kotlin that provides
separate lines of code information for Java and Kotlin. I've kept these
since separate file coverage information for languages like Java and
Kotlin is only available for GHES 3.12 and later.
mbg
mbg previously approved these changes Mar 11, 2024
@henrymercer henrymercer added the no-change-note-required This PR does not need a change note label Mar 11, 2024
@henrymercer
Copy link
Contributor Author

I've added a changenote on the CLI side.

geoffw0
geoffw0 previously approved these changes Mar 13, 2024
Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

👍 (CPP and Swift; though I don't really see a need for sign off from every language here)

RasmusWL
RasmusWL previously approved these changes Mar 15, 2024
Copy link
Member

@RasmusWL RasmusWL left a comment

Choose a reason for hiding this comment

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

LGTM (I agree that you can just merge without more approvals)

@henrymercer
Copy link
Contributor Author

Based on some internal feedback, I'm going to implement a "debug" level for metric queries that means they will only show up in the analysis summary at higher verbosities, for example when running in the CodeQL Action debug mode.

This lets advanced users see the lines of code information more easily, while we display only the improved and less flawed file-based coverage information by default.

@henrymercer henrymercer changed the title Mark lines of code queries as telemetry queries Show lines of code data in debug mode only Mar 20, 2024
@henrymercer henrymercer dismissed stale reviews from RasmusWL, geoffw0, and mbg via a76832f March 20, 2024 21:19
Copy link
Contributor

@michaelnebel michaelnebel left a comment

Choose a reason for hiding this comment

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

LGTM

@henrymercer henrymercer merged commit 4e3a6e2 into main Mar 21, 2024
57 checks passed
@henrymercer henrymercer deleted the henrymercer/mark-loc-as-telemetry branch March 21, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants