File: task_lint.sh

package info (click to toggle)
dlpack 0.0~git20200217.3ec0443-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 244 kB
  • sloc: ansic: 117; python: 88; cpp: 57; sh: 38; makefile: 30
file content (23 lines) | stat: -rwxr-xr-x 648 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
mkdir -p bin

if [ ! -f bin/lint.py ]; then
    echo "Grab linter ..."
    wget https://raw.githubusercontent.com/dmlc/dmlc-core/master/scripts/lint.py
    mv lint.py bin/lint.py
fi

echo "Check codestyle of c++ code..."
python bin/lint.py dlpack cpp include contrib

echo "Check doxygen generation..."
make doc 2>log.txt
(cat log.txt| grep -v ENABLE_PREPROCESSING |grep -v "unsupported tag") > logclean.txt
echo "---------Error Log----------"
cat logclean.txt
echo "----------------------------"
(cat logclean.txt|grep warning) && exit -1
(cat logclean.txt|grep error) && exit -1
rm logclean.txt
rm log.txt
echo "All checks passed..."