- General style guidelines -- like newlines at the end of file -- are linted for using pre-commit
- The rules enforced are available in the repo's .pre-commit-config.yaml file.
- You can install pre-commit locally with these instructions.
- The linter may be run locally using
pre-commit run --all-files
. Additionally it can be installed as a commit hook withpre-commit install
.
- C++ code uses the Envoy style guide
- Code is auto-formatted using
clang-format
with these rules
- Java code is auto-formatted using
clang-format
with these rules
- Objective-C code is auto-formatted using
clang-format
with these rules
- Kotlin code style is validated using detekt
- The rules enforced are available in the repo's .kotlinlint.yml file.
We build upon the default config provided by
detekt
- Swift code style is validated using SwiftLint
- The rules enforced are available in the repo's .swiftlint.yml file
- The linter may be run locally using
swiftlint
or auto-corrected withswiftlint autocorrect
- There's no directly supported way to universally share an enumeration across platforms. In order
to provide some enforced consistency, we've adopted the convention of defining the enum at the
lowest applicable layer (core/bridge) of the library, and then declaring public
extern const
values defined in terms of the enumeration, to be shared across bridge and platform code. See, for example: