Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 0516bab

Browse files
committed
Merge pull request #218 from kovach/checking-short
code quality checks
2 parents 9159207 + 4eb2dc3 commit 0516bab

28 files changed

+6006
-67
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,13 @@ add_subdirectory(src)
7676
add_subdirectory(docs)
7777
add_subdirectory(tests)
7878

79+
# Must match setting inside Doxyfile
80+
set(DOXYGEN_WARNINGS "docs/doxygen_warnings.txt")
81+
set(ALLOWED_DOXYGEN_WARNINGS ${PROJECT_SOURCE_DIR}/checks/allowed_doxygen_warnings.txt)
82+
83+
# TODO add srcs dependency
84+
add_custom_target(check-doxygen
85+
COMMAND diff ${ALLOWED_DOXYGEN_WARNINGS} ${DOXYGEN_WARNINGS}
86+
DEPENDS docs swiftnav-static)
87+
88+
add_custom_target(check-style DEPENDS check-doxygen checkpatch)

DEVELOPMENT.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
libswiftnav development
2+
=======================
3+
4+
Follow these instructions if you intend to make changes to libswiftnav.
5+
6+
Tools needed:
7+
* doxygen
8+
* convert from ImageMagick
9+
* pip install gcovr diff-cover
10+
11+
To get started, run::
12+
./checks/setup-hooks.sh [DIR]
13+
14+
from within the libswiftnav root directory. The default build-dir will be `build`.
15+
16+
This makes the directory if it doesn't already exist, runs cmake with `Coverage` mode enabled
17+
inside it, and installs a git pre-commit hook that runs style and code-coverage checkers
18+
in this build directory. These checks require doxygen, gcovr, and diff-cover
19+
20+
To manually run the coverage task, use `make check-coverage`. For syntax, use `make check-style`.

checks/allowed_doxygen_warnings.txt

Whitespace-only changes.

checks/checkoutput.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#echo "HEY: git diff $1 | $2 --no-tree - > check_output.txt"
2+
git diff $1 | $2 --no-tree - > check_output.txt

0 commit comments

Comments
 (0)