Skip to content

Commit a8cc43b

Browse files
committed
docs/development_instructions.rst: Update regarding review comments.
Signed-off-by: zhanglinjing <[email protected]>
1 parent 0e36c38 commit a8cc43b

File tree

1 file changed

+40
-25
lines changed

1 file changed

+40
-25
lines changed

docs/development-instructions.rst

+40-25
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ Development Instructions
33

44
..
55
TODOS:
6-
- Contribution guidelines (move here from Contributing.md)
76
- Code conventions
8-
- ....
97
- Tools installation:
10-
- pre-commit hook?
11-
- spellchecker
8+
- test
9+
- doc
10+
- code check
1211
- ...
1312
1413
.. _env_dev_setup:
@@ -91,19 +90,52 @@ If you encounter strange behavior with Arduino IDE during development, try clean
9190
9291
~/Library/Application Support/arduino-ide/
9392

93+
Code Check and Tests
94+
----------------------
95+
96+
Pre-commit Hooks
97+
^^^^^^^^^^^^^^^^^^
98+
For the C/C++ code format and commit message format, we add git hooks to check it automatically.
99+
100+
For ease of use, we currently use `pre-commit <https://pre-commit.com/>`_ to automatically run clang-formatting to format all C/C++ code.
101+
Please install this Python package, and follow the quick start (the pre-commit configuration file is already there). You should be able to format your code automatically on git commit.
102+
103+
We also have workflow to for auto-checking, so please refer to code convention before committing your code.
104+
105+
Code Check
106+
^^^^^^^^^^^^
107+
.. warning::
108+
109+
Code Checks are still a work in progress in this project.
110+
111+
If you are developing a new built-in library, please refer to ``libraries\CAN\Makefile.codecheck`` using cppcheck for static code analysis to ensure code quality.
94112

95113
Automated Build Checks
96-
-----------------------
114+
^^^^^^^^^^^^^^^^^^^^^^^^
115+
Currently a GitHub Action workflow is used for automatic compilation checking.
116+
Workflows are defined `here <https://github.com/Infineon/XMC-for-Arduino/blob/master/.github/workflows/compile-platform-examples.yml>`_.
117+
118+
Validation Test
119+
^^^^^^^^^^^^^^^^
120+
To validate the XMC-for-Arduino, we utilize Unity for testing various features of the Arduino core and built-in libraries.
121+
122+
Tests are located in ``tests/arduino-core-tests`` and included as submodule in this project. Run ``git submodule update --init --recursive`` to update them.
123+
124+
If you need to run these tests locally, you'll also need to download `GNU Make <https://www.gnu.org/software/make/#download>`_ .
125+
126+
Release
127+
---------
128+
Add a git tag in the format `Vx.y.z` (e.g. V3.3.0) to trigger the release process.
97129

98-
Currently a GitHub Action workflow is used for automatic compilation checking and releasing. Workflows are defined [here](https://github.com/Infineon/XMC-for-Arduino/tree/master/.github/workflows).
99-
Before opening a Pull Request for your contribution, please add a git tag in the format `Vx.y.z` (e.g. V3.3.0) to trigger the release process in your fork and pass the compilation tests.
100130

101131
Creating and Maintaining Third Party Libraries
102132
------------------------------------------------
103133
Basics
104134
^^^^^^^^
105135
The Arduino IDE allows for external libraries to be added to support specific devices and functions which are not part of the core setup. For details on creating libraries see the
106-
[Arduino library specification](https://arduino.github.io/arduino-cli/library-specification/). If you add additional libraries to this project, make sure to [document them](https://xmc-arduino.readthedocs.io/en/latest/builtin-libraries.html) accordingly.
136+
`Arduino library specification <https://arduino.github.io/arduino-cli/library-specification/>`_.
137+
138+
If you add additional libraries to this project, make sure to `document them <https://xmc-arduino.readthedocs.io/en/latest/builtin-libraries.html>`_ accordingly.
107139

108140
XMC-for-Arduino Configuration
109141
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -116,20 +148,3 @@ When creating or maintaining third party or external libraries for XMC-for-Ardui
116148
architecture=xmc
117149
118150
If your library also supports other boards and architectures, add those in as well.
119-
120-
Validation Test
121-
----------------
122-
To validate the XMC-for-Arduino, we utilize Unity for testing various features of the Arduino core and built-in libraries.
123-
124-
Tests are located in ``tests/arduino-core-tests`` and included as submodule in this project. Run ``git submodule update --init --recursive`` to update them.
125-
126-
Code Checks
127-
----------------
128-
.. warning::
129-
130-
Code Checks are still a work in progress in this project.
131-
132-
Refer to ``libraries\CAN\Makefile.codecheck``.
133-
134-
Regarding formatting, we currently use `pre-commit <https://pre-commit.com/>`_ to automatically run clang-formatting to format all C/C++ code.
135-
Please install this Python package, and follow the quick start (the pre-commit configuration file is already there). You should be able to format your code automatically on git commit!

0 commit comments

Comments
 (0)