Skip to content

Commit fb9dcb9

Browse files
committed
Update linting functions to work recursively and to ignore false positives
1 parent 0d874cc commit fb9dcb9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
function install() {
44
wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
55
unzip libtorch-shared-with-deps-latest.zip
6-
rm -rf libtorch-shared-with-deps-latest.zip
6+
rm -rf libtorch-shared-with-deps-latest.zip
77
}
88

99
function build() {
@@ -15,11 +15,13 @@ function build() {
1515
}
1616

1717
function lint() {
18-
cpplint --linelength=120 main.cpp tutorials/*/*/**
18+
cpplint --linelength=120 --recursive \
19+
--filter=-build/include_subdir,-build/include_what_you_use main.cpp tutorials/*/*/**
1920
}
2021

2122
function lintci() {
22-
python cpplint.py --linelength=120 main.cpp tutorials/*/*/**
23+
python cpplint.py --linelength=120 --recursive \
24+
--filter=-build/include_subdir,-build/include_what_you_use main.cpp tutorials/*/*/**
2325
}
2426

2527
if [ $1 = "install" ]

0 commit comments

Comments
 (0)