Skip to content

drivers: can: mcp2515: various code quality fixes #90593

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

Conversation

henrikbrixandersen
Copy link
Member

  • Declare the variable "data_idx" inside the loops to limit it's scope.
  • Terminate the if...else if construct with an else block in order to adhere to coding guidelines.
  • Merge two nested if-statements into one.
  • Reformat the MCP2515 driver files using clang-format and remove excessive newlines between variable declarations.

Declare the variable "data_idx" inside the loops to limit it's scope.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Terminate the if...else if construct with an else block in order to adhere
to coding guidelines.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Merge two nested if-statements into one.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Reformat the MCP2515 driver files using clang-format and remove excessive
newlines between variable declarations.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
@henrikbrixandersen henrikbrixandersen force-pushed the can_mcp2515_sonarqube_fixes branch from 628bc96 to 30967a7 Compare May 26, 2025 11:32
Copy link

@henrikbrixandersen henrikbrixandersen marked this pull request as ready for review May 27, 2025 16:28
@henrikbrixandersen
Copy link
Member Author

@alexanderwachter, @martinjaeger, @str4t0m: Please review.

Copy link
Collaborator

@str4t0m str4t0m left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@kartben kartben merged commit 362e17a into zephyrproject-rtos:main Jun 2, 2025
27 checks passed
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.

4 participants