Commit graph

15 commits

Author SHA1 Message Date
Stephanos Ioannidis
400c1fa744 doc: Add Zephyr codebase C standard library usage restriction rule
This commit adds the "Rule A.5: C Standard Library Usage Restrictions
in Zephyr Codebase" to the coding guidelines.

The initial list of allowed non-ISO C libc functions is based on the
non-ISO C functions available in the minimal libc.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-05-22 23:32:31 +09:00
Stephanos Ioannidis
fb93982348 doc: Add kernel C standard library usage restriction rule
This commit adds the "Rule A.4: C Standard Library Usage Restrictions
in Zephyr kernel" to the coding guidelines.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-05-22 23:32:31 +09:00
Simon Hein
1ba19f3fb6 doc: Reword coding guidline Stage 2 description
Reword the Stage 2 description part about starting sometime after
LTS2.

Signed-off-by: Simon Hein <Shein@baumer.com>
2023-05-18 15:15:03 -04:00
Carles Cufi
d095f7d22f doc: coding guidelines: Add a new rule for macro name collisions
This commit is the outcome of the discussion that has taken place in
multiple forums:

Discord:
https://discord.com/channels/720317445772017664/1014241011989487716/1032623375228608522

GitHub:
https://github.com/zephyrproject-rtos/zephyr/issues/51371
https://github.com/zephyrproject-rtos/zephyr/pull/50239

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-02-22 09:39:57 -08:00
Roman Kellner
5a7b0fb616 doc: coding guidelines: Add rule based page hooks
Add rule based page hooks to allow to jump to
the respective rule in a webbrowser directly.

Example:

.../coding_guidelines/index.html#misrac-rule-2-2

Signed-off-by: Roman Kellner <rkellner@baumer.com>
2022-05-31 13:50:58 -07:00
Aleksandar Markovic
019c90e28f doc: Improve layout of MISRA-C rules table
The layout of this table unreasonably assigns narrow widths for
for column(s) with lots of content, and wise-versa.

Define relative column widths to be more in sync with column
content. This will potentially produce more compact table, making
it more readable, clearer and more visually pleasing.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-25 14:06:31 -04:00
Henrik Brix Andersen
8bdfebf2ff doc: contribute: coding guidelines: add links to CAN inclusive language
Add links for the CAN in Automation recommendations for using inclusive
language terms in CAN.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-25 10:41:59 +01:00
Nazar Kazakov
f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Henrik Brix Andersen
2c0e0a74af doc: use extlink for github issue links
Use extlink for GitHub issue links in documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 12:48:43 -05:00
Maksim Masalski
843ea97eac doc: add parasoft tool section to the coding guidelines page
Recently we started to use Parasoft Codescan Static Analysis tool
to fix MISRA violations and align code to follow our Coding Guidelines.
I started fixing violations, and adding suppression tages to fix
false-positive findings. Developers started to ask me, what I'm doing
here and where is the documentation page about that.

Add a new section describing violations fixing process using Parasoft
tool.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2021-12-07 19:45:33 -05:00
Lauren Murphy
7ab16c457b doc: update coding guidelines compliance stages
Updates wording in Coding Guidelines page to remove outdated timelines
and correct the criteria for each stage. Changes reflect that we are
in stage 1 and will not reach stage 2 until the CI for enforcing
coding guidelines has been established.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-09-24 17:14:48 -04:00
Flavio Ceolin
14899616a3 doc: coding_guideline: Add a MISRA-C mandatory rule to Zephyr
This guideline seems to be missed during the Zephyr's code guideline
creation. That is a good guideline that aims to address some problems
like double free or freeing not allocated memory.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-05 11:46:59 +02:00
Flavio Ceolin
70cd67579d doc: coding_guidelines: Add a MISRA-C mandatory rule to Zephyr
This guideline address three undefined behaviors listed in the C99
standard. Although Zephyr does not support/implement these functions,
they are part of the C library and could be implemented in the future.

Also this is mandatory rule in MISRA-C and if one day Zephyr decides to
claim compliance with MISRA-C this guideline has to be followed.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-05 11:46:59 +02:00
Flavio Ceolin
f5b42d0aa3 doc: code_guidelines: Sort guidelines
Guidelines between rules 21.x and 22.x where not properly sorted.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-07-21 17:32:31 -04:00
Anas Nashif
dd41aca3d3 doc: move coding guidelines under contribute/
Move coding guideline under contribution guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-11 08:50:39 -04:00