Sponsored Content
Skip to content

Detect uninitialized variables in CMake files. - #6247

Merged
bthomee merged 6 commits into
developfrom
pratik/Detect-uninitialized-variables-in-CMake-files
Jan 22, 2026
Merged

Detect uninitialized variables in CMake files.#6247
bthomee merged 6 commits into
developfrom
pratik/Detect-uninitialized-variables-in-CMake-files

Conversation

@pratikmankawde

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Detects and raises an error for un-initialized CMake variables.

Context of Change

We had a-few uninitialized variables in CMake files. This change will make sure we always check if a variable has been initiazed before using them. Or in come cases default initialize them. This change will raise an error on CI if a dev. introduced an un-initialized variable in CMake files.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

None

Test Plan

Tested locally.

@mathbunnyru mathbunnyru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@pratikmankawde could we please not introduce style changes to this PR?
It makes it less focused and more difficult to read

Comment thread cmake/XrplSettings.cmake
@pratikmankawde

Copy link
Copy Markdown
Contributor Author

@pratikmankawde could we please not introduce style changes to this PR? It makes it less focused and more difficult to read

Yes, I will revert the style changes.

Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
@pratikmankawde
pratikmankawde force-pushed the pratik/Detect-uninitialized-variables-in-CMake-files branch from f308b01 to d10ddb7 Compare January 21, 2026 14:02
Comment thread cmake/XrplInstall.cmake Outdated
Comment thread cmake/XrplSettings.cmake
@codecov

codecov Bot commented Jan 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.4%. Comparing base (8695313) to head (3d042ad).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6247   +/-   ##
=======================================
  Coverage     79.4%   79.4%           
=======================================
  Files          839     839           
  Lines        71619   71619           
  Branches      8238    8237    -1     
=======================================
+ Hits         56846   56848    +2     
+ Misses       14773   14771    -2     

see 2 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread cmake/XrplCore.cmake
Comment on lines +36 to 39
$<$<BOOL:${is_xcode}>:
--system-header-prefix="google/protobuf"
-Wno-deprecated-dynamic-exception-spec
>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we confirm this is still needed? Does anyone use Xcode to develop?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Who can confirm this?

pratikmankawde and others added 4 commits January 21, 2026 14:30
Co-authored-by: Bart <bthomee@users.noreply.github.com>
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
…f github.com:XRPLF/rippled into pratik/Detect-uninitialized-variables-in-CMake-files
@bthomee
bthomee merged commit a4f8aa6 into develop Jan 22, 2026
3 checks passed
@bthomee
bthomee deleted the pratik/Detect-uninitialized-variables-in-CMake-files branch January 22, 2026 16:16
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
There were a few uninitialized variables in CMake files. This change will make sure we always check if a variable has been initialized before using them, or in come cases initialize them by default. This change will raise an error on CI if a developer introduced an uninitialized variable in CMake files.
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.

4 participants