singa icon indicating copy to clipboard operation
singa copied to clipboard

feat: auto formatting & linting using pre-commit

Open tinyAdapter opened this issue 10 months ago • 0 comments

As documented in the repo, many formatters & linters are used, which can be annoying to manage and execute.

To tackle this, I recommend using pre-commit to combine all formatting, lining, and checking tools into a single run.

Specifically, I added .pre-commit-config.yaml to configure all tools listed in the repo. One can then use

pre-commit run --all-files

in the repo root folder to execute all of them.

I ran the command locally and auto-fixed 402 files. Other linting problems have to be addressed manually, e.g., reinterpret_cast instead of C-style cast. The full log is available here.

Considering whether this automatic process would break the code correctness or not, at least it has passed all written tests (by running the test GitHub action here).

In the future, the pre-commit trigger can be added to GitHub action for checking & auto-fixing.

tinyAdapter avatar Apr 25 '24 08:04 tinyAdapter

@HesselM, thank you for the contribution. We are trying to think through the support implications we (NXP) may have if we were to accept this PR. Do you have a product around this enablement?

dleach02 avatar Dec 02 '23 03:12 dleach02

Hi @dleach02 : yes, we have a full product line based on the qn9090 running Zephyr. A partner of us is using the same HAL to support the K32W061, as this is the same die as the qn9090, but with an ieee radio supporting threads and zigbee too.

Currently we are working on supporting power management within zephyr.

HesselM avatar Dec 05 '23 08:12 HesselM

@dleach02: as emailed, there are several products on the short-term roadmap which will rely on this port. These also include development board for third party to continue their development upon.

SynchronicIT avatar Dec 07 '23 14:12 SynchronicIT