Skip to content

Commit 3cdbe44

Browse files
authored
Merge pull request #4 from jgaffiot/testing
Testing
2 parents 7402928 + 4ccc815 commit 3cdbe44

25 files changed

+1548
-82
lines changed

.flake8

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@ exclude =
88
build,
99
install,
1010
.pytest_cache,
11+
pkg_templates/*,
1112

1213
# it's not a bug that we aren't using all of hacking
1314
ignore =
14-
# H104: file contains nothing but comments
15-
H104
16-
# H301: one import per line
17-
H301,
18-
# H306: imports not in alphabetical order (time, os)
19-
H306,
20-
# W503: line break before binary operator
21-
W503
22-
# E203: whitespace before ':', because of slicing (such as list[2 : 3])
23-
E203
15+
H104, # file contains nothing but comments (OK for __init__.py)
16+
H301, # one import per line (too restrictive)
17+
H306, # imports not in alphabetical order (time, os) (boring and of little use)
18+
W503, # line break before binary operator (useless with black)
19+
E203, # whitespace before ':' (useless with black)
20+
S101 # use of assert detected (useless with pytest)

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ install/*
3939
*.exe
4040
*.out
4141
*.app
42+
43+
# Python cache
44+
__pycache__/
45+
*.pyc

.pre-commit-config.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ repos:
2525
args: [--py38-plus]
2626

2727
# C++
28-
- id: compilation
29-
name: Compilation
30-
description: Compile the project
31-
language: system
32-
always_run: true
33-
entry: make all
34-
files: Makefile
35-
3628
- id: clang-format
3729
name: Clang-format
3830
description: Run `clang-format` against C/C++ header and source files
@@ -55,6 +47,14 @@ repos:
5547
entry: cppcheck --error-exitcode=1
5648
args: [--enable=warning]
5749

50+
- id: compilation
51+
name: Compilation
52+
description: Compile the project
53+
language: system
54+
always_run: true
55+
entry: make -j all
56+
files: Makefile
57+
5858
- repo: https://github.com/pre-commit/pre-commit-hooks
5959
rev: v4.0.1
6060
hooks:
@@ -100,8 +100,6 @@ repos:
100100
types: [python]
101101
- id: debug-statements
102102
types: [python]
103-
- id: fix-encoding-pragma
104-
types: [python]
105103
- id: requirements-txt-fixer
106104

107105
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt

CPPLINT.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ filter=-whitespace/parens
88
filter=-whitespace/braces
99
filter=-whitespace/indent
1010
filter=-whitespace/operators
11+
filter=-whitespace/semicolon
1112
filter=-readability/alt_tokens
1213
filter=-runtime/references

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ RELEASE_DIR := ./build/release/
22
DEBUG_DIR := ./build/debug/
33

44
TOOLS_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
5-
MAKE += --no-print-directory
6-
CMAKE := cmake $(TOOLS_DIR)/source #--trace --debug-output
5+
CMAKE := cmake $(TOOLS_DIR)/source
76
FLAG := -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
87

9-
ifdef DEBUG
10-
FLAG += -DDEBUG=$(DEBUG)
8+
ifdef DEBUG_BUILD
9+
CMAKE += --trace --debug-output
10+
MAKE += --trace -d
11+
else
12+
MAKE += --no-print-directory
1113
endif
1214

1315
all: install_release

0 commit comments

Comments
 (0)