nasa / fprime-tools

F´ Python tooling and helpers.
https://github.com/nasa/fprime
Apache License 2.0
21 stars 39 forks source link

Handle whitespaces in `format` command #121

Closed thomas-bc closed 1 year ago

thomas-bc commented 1 year ago
Originating Project/Creator
Affected Component
Affected Architectures(s) format
Related Issue(s) https://github.com/nasa/fprime/issues/1939
Has Unit Tests (y/n)
Builds Without Errors (y/n) Y
Unit Tests Pass (y/n) Y
Documentation Included (y/n)

Change Description

Handles whitespaces in between FPrime access modifiers and the colon, such as PRIVATE:. This will also catch newlines, so patterns like

PRIVATE
:

which are technically correct are handled and formatted correctly.

Note: the output of the formatting tool is not being altered. That is, a PRIVATE : input will result in a PRIVATE: output, which is the correct formatting.

Rationale

Fixes https://github.com/nasa/fprime/issues/1939