This project enforces consistent code style across both Kotlin and C++ codebases.
This project uses ktlint to maintain Kotlin code style.
To check Kotlin code style:
./gradlew ktlintCheck
To format Kotlin code automatically:
./gradlew ktlintFormat
This project uses clang-format to maintain C++ code style based on the project's .clang-format
configuration file.
To format C++ code, you need to have clang-format
installed:
For convenience, a script is provided to format both Kotlin and C++ code in a single command:
# From the project root directory
./scripts/format.sh
The script will:
- Format all Kotlin code using ktlint
- Format all C++ code in app/src/main/cpp using clang-format
- Report any files that were modified during formatting