64 lines
1.9 KiB
ReStructuredText
Raw Normal View History

Testing
=======
Clang Format
------------
Source code is tested against the `.clang-format` file for linting errors. The workflow file responsible for clang
2022-10-29 22:14:16 -04:00
format testing is `.github/workflows/cpp-clang-format-lint.yml`.
Test clang-format locally.
.. code-block:: bash
2022-12-28 16:30:32 -05:00
find ./ -iname *.cpp -o -iname *.h -iname *.m -iname *.mm | xargs clang-format -i
Sphinx
------
2023-08-31 15:49:01 -04:00
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`__ for documentation building. Sphinx, along with other
2023-03-07 20:26:03 -05:00
required python dependencies are included in the `./docs/requirements.txt` file. Python is required to build
2022-10-29 22:14:16 -04:00
sphinx docs. Installation and setup of python will not be covered here.
2023-03-07 20:26:03 -05:00
Doxygen is used to generate the XML files required by Sphinx. Doxygen can be obtained from
2023-08-31 15:49:01 -04:00
`Doxygen downloads <https://www.doxygen.nl/download.html>`__. Ensure that the `doxygen` executable is in your path.
2023-03-07 20:26:03 -05:00
.. seealso::
Sphinx is configured to use the graphviz extension. To obtain the dot executable from the Graphviz library,
see the `librarys downloads section <https://graphviz.org/download/>`__.
The config file for Sphinx is `docs/source/conf.py`. This is already included in the repo and should not be modified.
2023-03-07 20:26:03 -05:00
The config file for Doxygen is `docs/Doxyfile`. This is already included in the repo and should not be modified.
Test with Sphinx
.. code-block:: bash
cd docs
make html
Alternatively
.. code-block:: bash
cd docs
sphinx-build -b html source build
2023-08-31 15:49:01 -04:00
Lint with rstcheck
.. code-block:: bash
rstcheck -r .
Check formatting with rstfmt
.. code-block:: bash
rstfmt --check --diff -w 120 .
Format inplace with rstfmt
.. code-block:: bash
rstfmt -w 120 .
Unit Testing
------------
.. Todo:: Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact
with us, or make a PR with suggested changes.