Problem running task_lint.sh locally


#1

Hi. I have problem running task_lint.sh locally. The error looks like this:

mironov@7082036799c3:~/tvm-mironov$ ./tests/scripts/task_lint.sh
Check codestyle of c++ code...
python3 3rdparty/dmlc-core/scripts/lint.py vta cpp vta/include vta/src
vta/include/vta/runtime.h:7:  #ifndef header guard has wrong style, please use: VTA_MIRONOV_TVM_VTA_INCLUDE_VTA_RUNTIME_H_  [build/header_guard] [5]
vta/include/vta/runtime.h:274:  #endif line should be "#endif  // VTA_MIRONOV_TVM_VTA_INCLUDE_VTA_RUNTIME_H_"  [build/header_guard] [5]
...
(and so on, many errors about header guards)

Lint asks me to add VTA_MIRONOV_TVM_VTA_INCLUDE prefix to header guards, that probably should come from project’s folder name (I have cloned tvm to ~/tvm-mironov folder). Does anybody know what should I fix?


#2

Makefile run pylint like this.

python3 3rdparty/dmlc-core/scripts/lint.py topi cpp topi/include

Result is the same, many header guard errors.


#3

Attempting to fix in https://github.com/dmlc/dmlc-core/pull/490


#4

The linter will attempt to find a git root and then define header convention there, can you check if you have cloned to a subdir of another git folder?


#5

Yes, I linked tvm as a submodule to other repository. Looks like it is the cause of the problem. Do we have any means to set lint root explicitly?


#6

This logic is part of the cpplint and we need to look into the code to see what is happening