[496 Battery module incorrectly trims whitespace] #515
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#496
the two last %parameters, the expected output must reflect this space
character;
clang-format -i **/*.[ch] (clang-format version 16.0.3) as specified
in the CONTRIBUTING.md file;
Note:
I believe the initial intent of the trimming was to remove spaces due
to empty values such as in this example: %remaining having no value
when the battery is at 100%.
It creates a tailing space, which was in the formatting, made by the user,
to separate the last two parameters.
format: ... %status %remaining
result: ... [status value][space][empty string here due to no value]
Although, even with the trimming, an empty value right in the middle of
a set of %parameters will still make empty spaces.
I tested the claim other modules not trimning and it was the true. In
other words, the trimming did not fix anything and it was causing this
module to behave abnormally.