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

CI: GitHub code scanning integration for detekt errors / warnings #4887

Merged

Conversation

DataM0del
Copy link
Contributor

This PR pretty much just adds more QoL. Nothing really useful for anyone who isn't reviewing the code for PRs.
See https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning#about-third-party-code-scanning-tools

I just stole it from the detekt docs, GitHub adds a little embed at the end of the line which shows the workflow and some other info from the SARIF file you give it.
Another tip that I discovered: If you click on the SARIF file that detekt generates, IntelliJ IDEA will show everything detekt found in the "Server-side Analysis" tab of the "Problems" view.
See https://detekt.dev/docs/introduction/reporting/#integration-with-github-code-scanning

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@DataM0del DataM0del marked this pull request as draft December 14, 2024 20:22
@DataM0del
Copy link
Contributor Author

intentionally triggering detekt for demonstration, that commit will be reverted immediately after the CI is done.

@DataM0del
Copy link
Contributor Author

well, actually, that's a good demo.

@DataM0del
Copy link
Contributor Author

now to revert the commit!

@DataM0del
Copy link
Contributor Author

this is how it looks inline when viewing the commit diff (and probably the PR diff too)
image

@DataM0del DataM0del marked this pull request as ready for review December 14, 2024 20:32
@larryngton2
Copy link
Contributor

nice

@1zun4
Copy link
Member

1zun4 commented Dec 14, 2024

Good

@1zun4 1zun4 merged commit e835b39 into CCBlueX:nextgen Dec 14, 2024
3 checks passed
@DataM0del DataM0del deleted the ci/detekt-gh-code-scanning-integration branch December 21, 2024 02:21
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