File: task_lint.sh

package info (click to toggle)
dlpack 1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 472 kB
  • sloc: python: 277; ansic: 97; cpp: 64; makefile: 42; sh: 24
file content (23 lines) | stat: -rwxr-xr-x 646 bytes parent folder | download | duplicates (3)
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/main/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..."