Skip to content

[LLM] Integrate Detekt linter aspect and add AGENTS.md guide - #5

Merged
menny merged 3 commits into
mainfrom
detekt-aspect
Oct 15, 2026
Merged

menny merged 3 commits into
mainfrom
detekt-aspect

Conversation

@menny

@menny menny commented Oct 15, 2026

Copy link
Copy Markdown
Member

Summary

Merges the detekt-aspect branch (including AGENTS.md) into main.

Key Changes

  • Detekt Integration via Aspect:
    • Adds Detekt CLI (io.gitlab.arturbosch.detekt:detekt-cli:1.23.8) via Maven dependency in MODULE.bazel.
    • Implements custom lint_detekt_aspect in tools/lint/detekt.bzl powered by aspect_rules_lint's lint_aspect.bzl.
    • Configures root detekt.yml with guard clause exclusions and baseline support.
    • Replaces ktlint in tools/lint/linters.bzl and .bazelrc under --config=lint.
    • Cleans up ktlint configuration and baseline files.
    • Fixes Detekt issues (ReturnCount and MagicNumber) in CognateDetector.kt.
  • AGENTS.md Operational Contract:
    • Adds AGENTS.md specifying mandatory verification gates (format.check, build --config=lint, test).
    • Adapts commit message guidelines ([LLM] prefix, no AI attribution), testing patterns ([OriginalFileName]Test.kt, fakes over mocks), and inclusive naming standards from AnySoftKeyboard.
    • Codifies strict invariants (Bazel-only, pure JVM core/* with zero android.* dependencies, push via SSH).

Verification

  • bazelisk run //:format.check passes cleanly.
  • bazelisk build --config=lint //... passes across all targets.
  • bazelisk test //... passes (21/21 tests passing).

menny added 3 commits October 15, 2026 18:52
Introduce custom Detekt aspect in tools/lint/detekt.bzl using aspect_rules_lint.
Fetch io.gitlab.arturbosch.detekt:detekt-cli via rules_jvm_external maven dependency and run via java_binary.
Wire Detekt into linters.bzl and .bazelrc, producing both terminal output and SARIF reports.
Clean up ktlint configuration and baseline.
Introduce AGENTS.md in the root directory defining project verification gates, commit message standards, testing guidelines, inclusive naming conventions, and architecture invariants.
[LLM] Add AGENTS.md operational contract and agent guide
@menny
menny merged commit 9a18273 into main Oct 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant