According to commit 400c1fa744 which
introduced rule A.5 to the coding guidelines, the initial exception list
was based on the non-standard function availability in minimal libc.
gmtime_r() however, has not been included to the list, although it's
present in minimal libc since 3e8df8b369.
This commit fixes this, by adding gmtime_r() to the rule A.5 exception
list.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rule A.5 is meant for code build with the embedded libCs and
which runs in embedded targets. Let's be more clear about this
and explicitly indicate that host tooling is not covered by it.
Otherwise, the current
"The "Zephyr codebase" in this context refers to all source
code files committed to the main Zephyr repository"
covers too much.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update the reference to the Bluetooth Appropriate Language Mapping
Tables document. The link is now the same as the Bluetooth SIG website
uses.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Drop the section of the coding guidelines that's referring to Parasoft
Codescan as it's not used by the project anymore.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
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>
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>
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>
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>
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>
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>
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>
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>