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

Sonarcloud fixes #70

Merged
merged 9 commits into from
Feb 21, 2025
Merged

Sonarcloud fixes #70

merged 9 commits into from
Feb 21, 2025

Conversation

jtguggedal
Copy link
Contributor

No description provided.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🎯 Core Changes:

  • Improved code quality by adding missing ARG_UNUSED() macros for unused parameters
  • Renamed state object structs to be more descriptive (e.g. s_object -> battery_state)
  • Made state object parameters const where appropriate
  • Fixed comment style consistency (// -> /**/)
  • Removed redundant parentheses

⚠️ Concerns:
None

Verdict: Approve - These are safe code quality improvements that make the code more maintainable without changing functionality.


Code review performed by ANTHROPIC - claude-3-5-sonnet-20241022.

Note: Some line comments were omitted due to technical limitations.

This issues was reported by Sonarcloud.
Also, change the state variable name to a more descriptive.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Make the battery state struct name more descriptive.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
This issues was reported by Sonarcloud.
Change the state variable name to a more descriptive name.
Void an unused argument in work handler.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
* Constify pointers to read-only state variable
* Make state object name more descriptive

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
* Constify pointers to read-only state variable
* Make state object name more descriptive

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Reported by Sonarcloud.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Reported by Sonarcloud.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Reported by Sonarcloud.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Reported by Sonarcloud.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
@jtguggedal jtguggedal force-pushed the sonarcloud-fixes-main branch from db0049c to e2c7b67 Compare February 21, 2025 11:34
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
11.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@jtguggedal jtguggedal merged commit 7b563c6 into main Feb 21, 2025
3 of 4 checks passed
@jtguggedal jtguggedal deleted the sonarcloud-fixes-main branch February 21, 2025 11:39
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.

1 participant