Coding standards and style guide
quick-lint-js’ C++ code is formatted using the clang-format tool, version 9.0.x. During development, use clang-format in one of two ways:
yourself, then run the
tools/formatscript to format all of quick-lint-js’ code with one command.
- Run clang-format in your editor (CLion, Emacs, Vim, Visual Studio, Visual Studio Code). Be sure to use version 9.0.x, or you might have problems with the CI clang-format checker.
websitedirectory, install Prettier with
yarn installthen run it with
yarn fmt. This formats all of quick-lint-js’ code in that subproject with one command.
Run Prettier in your editor with
Prettier editor integration. You need to run
yarn installin the subproject’s directory in order for editor integration to work.