diff --git a/html/contributing.html b/html/contributing.html index 4310ebf62b..a734bd7ff7 100644 --- a/html/contributing.html +++ b/html/contributing.html @@ -239,51 +239,53 @@
If you are developing NMODL, make sure to enable both
-NMODL_FORMATTING
and NMODL_PRECOMMIT
CMake variables to ensure
-that your contributions follow the coding conventions of this project:
.. code:: cmake
-cmake -DNMODL_FORMATTING:BOOL=ON -DNMODL_PRECOMMIT:BOOL=ON
The first variable provides the following additional targets to format -C, C++, and CMake files:
-::
-make clang-format cmake-format
-The second option activates Git hooks that will discard commits that do -not comply with coding conventions of this project. These 2 CMake -variables require additional utilities:
-ClangFormat 7 <https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormat.html>
__
cmake-format <https://github.com/cheshirekow/cmake_format>
__
pre-commit <https://pre-commit.com/>
__
clang-format can be installed on Linux thanks to LLVM apt page <http://apt.llvm.org/>
__. On MacOS, you can simply install llvm
-with brew: brew install llvm
. cmake-format and pre-commit
-utilities can be installed with pip.
Validate the Python package
+Formatting
+
+Run the HPC coding conventions formatter to format all source files:
+
+.. code:: bash
+
+ cmake/hpc-coding-conventions/bin/format
+
+The HPC coding conventions formatter installs any dependencies into a Python
+virtual environment.
+
+
+Validate the Python package
+
You may run the Python test-suites if your contribution has an impact on +the Python API:
+setup a sandbox environment with either virtualenv, pyenv, or
+pipenv. For instance with virtualenv:
+python -m venv .venv && source .venv/bin/activate
build the Python package with the command: python setup.py build
install pytest Python package: pip install pytest
execute the unit-tests: pytest
Memory Leaks and clang-tidy
-You may run the Python test-suites if your contribution has an impact on
-the Python API:
+If you want to test for memory leaks, do :
+
+::
+
+ valgrind --leak-check=full --track-origins=yes ./bin/nmodl_lexer
+
+Or using CTest as:
+
+::
+
+ ctest -T memcheck
+
+If you want to enable ``clang-tidy`` checks with CMake, make sure to
+have ``CMake >= 3.15`` and use following cmake option:
-1. setup a sandbox environment with either *virtualenv*, *pyenv*, or
- *pipenv*. For instance with *virtualenv*:
- ``python -m venv .venv && source .venv/bin/activate``
-2. build the Python package with the command: ``python setup.py build``
-3. install *pytest* Python package: ``pip install pytest``
-4. execute the unit-tests: ``pytest``
+::
-Memory Leaks and clang-tidy
+ cmake .. -DENABLE_CLANG_TIDY=ON
If you want to test for memory leaks, do :
-::
-valgrind –leak-check=full –track-origins=yes ./bin/nmodl_lexer
-Or using CTest as:
-::
-ctest -T memcheck
-If you want to enable clang-tidy
checks with CMake, make sure to
-have CMake >= 3.15
and use following cmake option:
::
-cmake .. -DENABLE_CLANG_TIDY=ON