Command Line

17. Formats and Linters

2020-03-25 08:00 CST
2020-03-25 23:25 CST
[![Creative Commons License](https://i.creativecommons.org/l/by-nc/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc/4.0/)

Formats

C/C++

代码风格:Google, linux, gnu

indent
astyle --style=gnu src/*.cpp include/*.h # brew install astyle

In Vscode: "C\_Cpp.clang\_format\_style": "{ BasedOnStyle: Google, IndentWidth: 4}"

Python

代码风格:pep8

autopep8 --in-place --aggressive test.py # pip install pep8

Frontend

Prettier

Lint

静态代码检测

  • pylint
  • eslint