forked from trailofbits/polytracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformat.sh
More file actions
executable file
·20 lines (15 loc) · 885 Bytes
/
format.sh
File metadata and controls
executable file
·20 lines (15 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
# Temporary formatting script to enforce some code style/standards
set -e
# Clang-format to auto format the relevant parts of the C++ code base
# In CI this runs against the third_party clang_format checker
# Note that we are using clang-format 10 locally and in CI
clang-format -i polytracker/src/**/*.cpp
clang-format -i polytracker/include/**/*.h
# Black to auto format code, mypy for type checking
# Temporarily disabled because a bug in black is causing it not to reach a
# reformatting fixed point (every subsequent call causes reformatting)
# black polytracker tests --exclude '/(polytracker/src|polytracker/scripts)/'
flake8 polytracker tests --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 polytracker tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
mypy --ignore-missing-imports polytracker tests