-
Notifications
You must be signed in to change notification settings - Fork 10
Add Sonar workflow configuration #126
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA new GitHub Actions workflow configuration file, Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/sonar.yml (1)
28-28
: Add a newline at end of file.For style compliance and to avoid linter warnings, add a newline at the end of the file.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 28-28: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/sonar.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/sonar.yml
[error] 28-28: no new line character at the end of file
(new-line-at-end-of-file)
go-version: '1.24' | ||
|
||
- name: Generate Sonar Report | ||
run: go test -coverpkg=./... -coverprofile=coverage.out -json ./... > sonar-report.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential coverage report format mismatch for SonarCloud.
The command:
run: go test -coverpkg=./... -coverprofile=coverage.out -json ./... > sonar-report.json
outputs test results in JSON format to sonar-report.json
, but SonarCloud typically expects the Go coverage file (coverage.out
) in its native format, not JSON. You may want to upload coverage.out
instead, or check SonarCloud documentation to ensure the correct file is being used.
Consider splitting the commands:
run: |
go test -coverpkg=./... -coverprofile=coverage.out ./...
and then upload coverage.out
to SonarCloud.
Let me know if you want a corrected workflow snippet.
Add Sonar workflow configuration with Go 1.24.
Created by GitHub Copilot.
Summary by CodeRabbit