You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development-instructions.rst
+40-25
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,11 @@ Development Instructions
3
3
4
4
..
5
5
TODOS:
6
-
- Contribution guidelines (move here from Contributing.md)
7
6
- Code conventions
8
-
- ....
9
7
- Tools installation:
10
-
- pre-commit hook?
11
-
- spellchecker
8
+
- test
9
+
- doc
10
+
- code check
12
11
- ...
13
12
14
13
.. _env_dev_setup:
@@ -91,19 +90,52 @@ If you encounter strange behavior with Arduino IDE during development, try clean
91
90
92
91
~/Library/Application Support/arduino-ide/
93
92
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.
94
112
95
113
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.
97
129
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.
100
130
101
131
Creating and Maintaining Third Party Libraries
102
132
------------------------------------------------
103
133
Basics
104
134
^^^^^^^^
105
135
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.
If you add additional libraries to this project, make sure to `document them <https://xmc-arduino.readthedocs.io/en/latest/builtin-libraries.html>`_ accordingly.
107
139
108
140
XMC-for-Arduino Configuration
109
141
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -116,20 +148,3 @@ When creating or maintaining third party or external libraries for XMC-for-Ardui
116
148
architecture=xmc
117
149
118
150
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