From 204c159d98b31293e7032002227f05179327567f Mon Sep 17 00:00:00 2001 From: Matthew Khouzam Date: Wed, 26 Nov 2025 14:26:30 -0500 Subject: [PATCH] add coderabbit checking Change-Id: I4fdd4c491c49129d5792676c55e3c1573485bf65 Signed-off-by: Matthew Khouzam --- .coderabbit.yaml | 142 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 .coderabbit.yaml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000000..f18b799f7c --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,142 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +language: en-GB +tone_instructions: '' +early_access: false +enable_free_tier: true +reviews: + profile: chill + request_changes_workflow: true + high_level_summary: true + high_level_summary_placeholder: '@coderabbitai summary' + auto_title_placeholder: '@coderabbitai' + review_status: true + commit_status: true + poem: false + collapse_walkthrough: true + sequence_diagrams: false + changed_files_summary: true + labeling_instructions: [] + path_filters: + - '**/*' + - '**/gen/**' + - '!**/test/**/gen/**' + - '!**/.git/**' + - '!**/target/**' + path_instructions: + - path: '**/*.java' + instructions: | + - Review code using Java 21 standards, taking into account the rules defined by `src/main/checkstyle/checkstyle.xml`. + - Validate that code indentation uses spaces, not tabs, with an indent of multiple of 4. + - Validate that immutable local variables are not annotated with `final` unless the variable is required for use in an inner class. + - Allow use of `var` keyword when value is a cast `null`. + - Use a coding standard where multi-line expressions have operators and tenary separators at the end of line. + - Propose changes that only use the Java 21 API, not the API of Guava. + - The pattern matching `instanceof` expression safely handles `null`, returning `false`. + - path: '**/main/java/**/*.java' + instructions: | + - This project is mature and must provide a stable backwards-compatible public Java API. + - In the 'Summary by CodeRabbit' section, you must always provide a list of up to 25 changes to the public Java API that will affect end users. + If there are no changes, you must explicitly state that there are no changes to the public Java API in this PR. + The public Java API is defined as public and protected methods on public classes, plus the file `module-info.java`. + Provide the list by deeply analysing code flow, which incudes analysing code flow through private methods and calls to Guava and Java 21. + Changes to be reported on include: + - New or removed methods in the public Java API + - Changes to method return types or parameter types in the public Java API + - Changes to method behaviour in the public Java API that might affect consumers + - This project uses `System.out.println` instead of logging + - This project tends to prefer `for` loops to streams for performance reasons, however either form is acceptable. + Do not make suggestions to change between streams and for loops or vice versa. + - path: '**/test/java/**/*.java' + instructions: | + For test code, focus on: + - Correctness of test assertions + - Test coverage of edge cases + - Clear test naming and documentation + - Be more lenient with code style and minor optimisations + abort_on_close: true + auto_review: + enabled: true + auto_incremental_review: true + ignore_title_keywords: [] + labels: [] + drafts: false + base_branches: + - 'main' + tools: + shellcheck: + enabled: true + ruff: + enabled: false + markdownlint: + enabled: true + github-checks: + enabled: true + timeout_ms: 90000 + languagetool: + enabled: true + enabled_only: false + level: default + enabled_rules: [] + disabled_rules: + - EN_UNPAIRED_BRACKETS + enabled_categories: [] + disabled_categories: + - TYPOS + - TYPOGRAPHY + - CASING + biome: + enabled: true + hadolint: + enabled: false + swiftlint: + enabled: true + phpstan: + enabled: false + level: default + golangci-lint: + enabled: false + yamllint: + enabled: true + gitleaks: + enabled: true + checkov: + enabled: false + detekt: + enabled: false + eslint: + enabled: true + rubocop: + enabled: false + buf: + enabled: false + regal: + enabled: false + actionlint: + enabled: true + pmd: + enabled: true + cppcheck: + enabled: false + semgrep: + enabled: true + circleci: + enabled: true + ast-grep: + packages: [] + rule_dirs: [] + util_dirs: [] + essential_rules: true +chat: + auto_reply: true +knowledge_base: + opt_out: false + learnings: + scope: auto + issues: + scope: auto + jira: + project_keys: [] + linear: + team_keys: [] + pull_requests: + scope: auto