Files
flatbuffers-bigfoot/Formatters.md
mustiikhalil 8ab7c7e2c8 [CI] Adds formatter to CI (#6272)
* Adds formatters CI

Adds Error message & setup formatting like cpp

Adds Swift

Adds typescript

Adds python

tests yarn

Adds format.md

* Removes unneeded scripts + moves install script to install phase

* Adds format.md content

* Adds cpp to the formatter.md and fixes ci

* Adds cpp to formatter ci
2020-12-11 10:46:10 -08:00

1.1 KiB

Format Guidelines

If you are interesting in contributing to the flatbuffers project, please take a second to read this document. Each language has it's own set of rules, that are defined in their respective formatter/linter documents.

Notes

  • Run the linter on the language you are working on before making a Pull Request.
  • DONT format/lint the generated code.

Languages

C++

C++ uses clang-format as it's formatter. Run the following script sh src/clang-format-git.sh, and it should style the C++ code according to google style guide.

Swift

Swift uses swiftformat as it's formatter. Take a look at how to install here. Run the following command swiftformat --config swift.swiftformat . in the root directory of the project

Typescript

Typescript uses eslint as it's linter. Take a look at how to install here. Run the following command eslint ts/** --ext .ts in the root directory of the project