These rules apply to all Java code written or modified in this repository.
- Annotate every class with JetBrains Annotations
@NotNullByDefault. - Any type, field, parameter, return value, local variable, or generic type argument that may be
nullmust be explicitly annotated with@Nullable. - Nullability must never be implicit.
- Immutable arrays and collections must be explicitly annotated with JetBrains Annotations
@Unmodifiableor@UnmodifiableViewas appropriate. - For arrays, use type-use syntax such as
String @Unmodifiable [].
- Every class, field, and method must have documentation.
- Documentation must use
///Markdown-style Javadoc comments. - Keep documentation accurate and specific to the actual behavior, constraints, and side effects.
- Add concise implementation comments inside complex logic whenever they materially improve readability or explain non-obvious behavior.
- When invoking Gradle in this repository, always set
GRADLE_USER_HOMEto the workspace-local.gradle-user-homedirectory. - Prefer commands such as
./gradlew -g .gradle-user-home ...or the equivalent environment-variable-based configuration. - When running Gradle
testtasks, use a higher timeout of ten minutes.