Skip to content

Fix VT working set and application SonarQube warnings#699

Merged
sujandumaru merged 1 commit into
Open-Agriculture:mainfrom
sujandumaru:fix/vt-working-set-sonarqube-issues
Jun 26, 2026
Merged

Fix VT working set and application SonarQube warnings#699
sujandumaru merged 1 commit into
Open-Agriculture:mainfrom
sujandumaru:fix/vt-working-set-sonarqube-issues

Conversation

@sujandumaru

Copy link
Copy Markdown
Contributor

Describe your changes

This PR reduces SonarQube findings in the Virtual Terminal working-set parser and seeder example while preserving C++11 compatibility.

Changes include:

  • Added typed helpers for little-endian decoding and bit operations.
  • Replaced repeated casts and manual byte decoding.
  • Added explicit conversions to prevent integer precision loss.
  • Simplified control flow and removed redundant statements.
  • Used single-return implementations where appropriate.
  • Improved arithmetic type safety.
  • Simplified numeric-value event handling in the seeder example.

Verified SonarQube improvements:

  • isobus_virtual_terminal_working_set_base.cpp: 271 → 53 issues
  • vt_application.cpp: 10 → 6 issues
  • 222 verified issues resolved

The remaining findings generally require broader refactoring and are outside this PR's scope. This work is intended to improve the SonarQube reliability rating from C to A and pass the SonarQube analysis quality gate.

How has this been tested?

The modified files were rescanned using SonarQube for IDE. The project and complete unit-test suite were also run locally:

cmake --build build --target unit_tests
cd build
./test/unit_tests

@sujandumaru sujandumaru requested a review from ad3154 June 25, 2026 06:06
@ad3154 ad3154 self-assigned this Jun 26, 2026
@ad3154 ad3154 added the enhancement New feature or request label Jun 26, 2026
@sujandumaru sujandumaru merged commit b5c3f9d into Open-Agriculture:main Jun 26, 2026
10 checks passed
@sujandumaru sujandumaru deleted the fix/vt-working-set-sonarqube-issues branch June 26, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants