| 1 |
.. SPDX-License-Identifier: BSD-2-Clause |
| 2 |
.. |
| 3 |
.. Copyright (C) 2022-2024 Linutronix GmbH |
| 4 |
.. Author Kurt Kanzenbach <[email protected]> |
| 5 |
.. |
| 6 |
.. Testbench documentation qa file. |
| 7 |
.. |
| 8 |
|
| 9 |
Quality Assurance |
| 10 |
================= |
| 11 |
|
| 12 |
License Checks |
| 13 |
-------------- |
| 14 |
|
| 15 |
The license for the Linux RealTime Communication ``Testbench`` is the permissive BSD-2-Clause. All |
| 16 |
files have a valid SPDX identifier (see https://spdx.dev/). The provided license |
| 17 |
information can be automatically checked for errors by using the ``reuse`` |
| 18 |
tool. Example: |
| 19 |
|
| 20 |
.. code:: bash |
| 21 |
|
| 22 |
% reuse lint |
| 23 |
|
| 24 |
# SUMMARY |
| 25 |
|
| 26 |
* Bad licenses: |
| 27 |
* Deprecated licenses: |
| 28 |
* Licenses without file extension: |
| 29 |
* Missing licenses: |
| 30 |
* Unused licenses: |
| 31 |
* Used licenses: BSD-2-Clause, GPL-2.0-only, GPL-2.0-or-later |
| 32 |
* Read errors: 0 |
| 33 |
* Files with copyright information: 219 / 219 |
| 34 |
* Files with license information: 219 / 219 |
| 35 |
|
| 36 |
Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-) |
| 37 |
|
| 38 |
No errors should be printed. |
| 39 |
|
| 40 |
Coding Style Check |
| 41 |
------------------ |
| 42 |
|
| 43 |
The coding style for the Linux RealTime Communication ``Testbench`` is the Linux kernel style. The |
| 44 |
rules are described here: |
| 45 |
|
| 46 |
- https://www.kernel.org/doc/html/latest/process/coding-style.html#codingstyle |
| 47 |
|
| 48 |
The coding style can be enforced automatically by using ``clang-format`` (see |
| 49 |
https://clang.llvm.org/docs/ClangFormat.html). Example: |
| 50 |
|
| 51 |
.. code:: bash |
| 52 |
|
| 53 |
% clang-format -i src/*.c src/*.h |
| 54 |
|
| 55 |
This corrects errors in place for all C source files. |
| 56 |
|
| 57 |
Furthermore, the naming of variables, structs and function can be checked (and |
| 58 |
fixed inplace) by running ``clang-tidy``: |
| 59 |
|
| 60 |
.. code:: bash |
| 61 |
|
| 62 |
% mkdir build |
| 63 |
% cd build |
| 64 |
% cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. |
| 65 |
% make -j`nproc` |
| 66 |
% run-clang-tidy |