跳转到主要内容
终端工具

17. Formats and Linters

2020-03-25原始语言归档部分历史资源可能仍不完整

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