Skip to content

Instantly share code, notes, and snippets.

@danintel
Created January 27, 2022 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danintel/1dd3437584a7f8538b5f028336b23a69 to your computer and use it in GitHub Desktop.
Save danintel/1dd3437584a7f8538b5f028336b23a69 to your computer and use it in GitHub Desktop.
Hyperledger Avalon static source code checker (run_lint)
run_lint: Static source code checker for Hyperledger Avalon project.
Run any combination of pycodestyle, pylint3, and cppcheck on Python and C++ source code.
Usage:
run_lint [-h] [-n] [-s <branch>] -v <subdir> <pycodestyle-python> <pylint3> <pycodestyle-cpp> <cppcheck>
Where:
-h Display this usage message
-n Dry-run. Only print files that would be linted
<branch>
<subdir> Subdirectory with the source code to check.
Use "." for the current directory.
<pycodestyle-python> Use 1 to check Python source with pycodestyle, else 0
<pylint3> Use 1 to check Python source with pylint3, else 0
<pycodestyle-cpp> Use 1 to check C++ source with pycodestyle, else 0
<cppcheck-cpp> Use 1 to check C++ source with cppcheck, else 0
Return values:
0 on success
1 on failure (pycodestyle/pylint3/cppcheck warning or error found)
Examples:
run_lint -h
run_lint -n . 1 1 1 1
run_lint sdk 1 1 1 1
run_lint common/cpp 0 0 1 1
Source code:
https://github.com/hyperledger/avalon/blob/main/bin/run_lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment