On Nov 19, 2019, at 8:22 AM, Kevin Townsend via TF-M tf-m@lists.trustedfirmware.org wrote:
Hi Tamas,
Just to add to the conversation, something that the Zephyr project added to make
enforcing the coding guidelines easier was a config file for uncrustify.
https://docs.zephyrproject.org/latest/contribute/index.html#uncrustify
The Zephyr config file itself can be seen here:
https://github.com/zephyrproject-rtos/zephyr/blob/master/.uncrustify.cfg
The advantage here is that most text editors can be configured to automatically
apply these rules and avoid common white space or other issues.
I've generally found this very useful generating PRs and just ensuring
I didn't make
any obvious errors when I commit files or changes.
Best regards,
Kevin
On Mon, 18 Nov 2019 at 17:31, Tamas Ban via TF-M
tf-m@lists.trustedfirmware.org wrote:
Hi,
I would like to open a conversation about TF-M coding guidelinehttps://git.trustedfirmware.org/trusted-firmware-m.git/tree/docs/coding_guide.rst. I have these proposals:
- Change the rule of the 80 character column width:
- Max 80 characters length.
- Column length is max 80 character in first place, but there are exceptions when length could be MAX 120 character:
- Degrades code understandability: short, obscured variable names; awkward line breaks
- Maximum 1% of the lines can exceed 80 charter length.
- Might remove this rule, because in many cases we are not complaint with it. For example PSA Crypto API:
o Order function parameters so that input params are before output params.
o https://git.trustedfirmware.org/trusted-firmware-m.git/tree/interface/includ...
I'm interested in your opinions! Other rules also can be revisited!
Tamas
TF-M mailing list
TF-M@lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
--
TF-M mailing list
TF-M@lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m