clang-tidy
和
cppcheck
,但没有走得很远。要使我的期望更加清晰 - 从Python那里,我已经习惯了这样的事情:
$ cat test.py
def answer():
return 42
$ python3 -m pylint test.py
************* Module test
test.py:1:0: C0111: Missing module docstring (missing-docstring)
test.py:1:0: C0111: Missing function docstring (missing-docstring)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = YES
# Do not throw errors on warning
# otherwise, it will stop on first
# error
WARN_AS_ERROR = NO
# It will write all warnings to a
# warning file. Make sure to
# add this to your gitignore
WARN_LOGFILE = doxy.warn
# Optional
QUIET = YES
doxygen
现在,如果doxygen失败,我们将解析它并丢弃错误。这是我使用的Shell脚本(我对PowerShell不了解;所以,无法为Windows提供摘要):
doxy.warn