Skip to content

Document object-level @Suppress entries in dependency/local - #803

Merged
alexander-yevsyukov merged 1 commit into
masterfrom
document-local-suppressions
Oct 16, 2026
Merged

alexander-yevsyukov merged 1 commit into
masterfrom
document-local-suppressions

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

What

Makes the class-level @Suppress annotations across
buildSrc/src/main/kotlin/io/spine/dependency/local/ consistent.

Two styles had accumulated in that directory. Five files documented each
suppression inline with a block comment; ten still used the bare one-line form.
This PR converts the bare ones, so all 15 artifact catalogues now read the same
way:

@Suppress(
    "ConstPropertyName" /* We use a custom convention for artifact properties. */,
    "unused" /* Some subprojects do not use all Base artifacts. */,
)
object Base {

Follow-up to the review of #801, where this was raised as an optional nit and
explicitly kept out of that PR — expanding a @Suppress is unrelated churn on a
version-pin diff.

Survey

Style on master Files
Documented, multi-line Compiler, CoreJvmCompiler, DokkaTools, ProtoTap, Time
Bare, one-line Base, BaseTypes, Change, CoreJvm, Logging, Reflect, Spine, TestLib, ToolBase, Validation

Rationale wording

Reused verbatim from the files that already documented the same suppression
name, rather than invented per file:

  • ConstPropertyName → We use a custom convention for artifact properties.
  • MemberVisibilityCanBePrivate → The properties are used directly by other subprojects.
  • unused → per-file, following the existing pattern: Some subprojects do not
    use the Compiler directly.
    for the tools, Some subprojects do not use all
    Time artifacts.
    for the version catalogues.

Two files that already used the multi-line form were brought fully into line:

  • Time.kt — a pure wording fix: it said We use custom convention…, so the
    missing article was added. All 15 ConstPropertyName rationales in the
    package are now character-identical.
  • CoreJvmCompiler.kt — not a wording fix but a content addition: its unused
    entry was bare "unused" while its other two entries were documented, so it
    gained a rationale and the trailing comma the other four files use.

Not changed

No suppression name was added, removed, or reordered. The set of suppressed
inspections is unchanged in effect in every file, including the entry orders that
differ between files (Spine.kt lists "unused" first; most list
"ConstPropertyName" first). This is a documentation-of-intent change only, so
the diff contains no version literal and no Maven coordinate.

Member-level suppressions are out of scope. The bare @Suppress("unused")
on the deprecated typealias CoreJava in CoreJvm.kt is left as-is, even
though this PR reformats that file's object-level annotation — it is the only
bare suppression left in the package. It is not stale (CoreJava is retained
for consumer build scripts), so documenting it is a reasonable separate change.

Sibling scopes are out of scope. lib/, build/, test/, kotlinx/, and
boms/ hold 67 bare-form files against a single documented one
(lib/Protobuf.kt). The majority style there is the bare form, so converting
them is a separate decision rather than a consistency fix, and far too large to
fold in here.

Follow-up observations

None of these are acted on here — dropping a suppression is a behaviour change
and does not belong in a documentation PR. Note that unused is an IDE
inspection: neither detekt nor the compiler enforces it, so a stale entry
costs nothing at build time. These are IDE-noise cleanups.

  1. Spine.kt's unused is dead. Its only members, group and
    toolsGroup, have 11 and 17 out-of-file references respectively — it is the
    one object in the package where every declared member is referenced
    elsewhere, so nothing in the file can trigger unused. It is dead in
    consumer repos too, since the file travels there via ./config/pull. Its
    ConstPropertyName entry is live (const val group is lowerCamelCase).
  2. DokkaTools.kt's unused also looks dead — extensions is used at
    buildSrc/src/main/kotlin/DokkaExts.kt:48, and group/version are
    referenced in the object's own string templates. (Not a file this PR
    touches.)
  3. Entry ordering is inconsistent across the package — 9 files lead with
    ConstPropertyName, 5 with unused, and CoreJvmCompiler with
    MemberVisibilityCanBePrivate. Deliberately untouched under the no-reorder
    constraint, but now that the wording is uniform it is a cheap cosmetic
    follow-up.

Every other suppression was checked and is live: the remaining nine unused
entries each have at least one member with no references anywhere, all four
MemberVisibilityCanBePrivate entries guard members used only inside their own
object, and all 15 ConstPropertyName entries are needed.

Verification

  • ./gradlew detekt — BUILD SUCCESSFUL (the CI gate; config has no build task).
  • buildSrc:compileKotlin succeeds, so the annotations parse.
  • git diff --check clean; longest added line is 82 characters against a
    100-character limit.
  • The ordered sequence of suppression names in every @Suppress of every
    touched file is identical at origin/master and at HEAD.
  • No resolution probe needed: the change touches only annotations on constant
    catalogues.

🤖 Generated with Claude Code

All 15 artifact catalogues under `io.spine.dependency.local` now use the
same documented multi-line `@Suppress` form, with a block comment stating
why each inspection is suppressed. Previously ten of them carried the
bare one-line form.

The set of suppressed inspection names is unchanged in every file; this
is a documentation-of-intent change only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T21:45:34.465447Z 57c4338 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The changes are limited to documentation and formatting, preserve suppression behavior, and have no identified blocking issues.

No open issues 🎉

What changed in this PR

Standardizes object-level suppression documentation in the local dependency catalogues, following the cleanup deferred from #801.

Changes:

  • Expands ten annotations into documented, multi-line form.
  • Adds the missing CoreJvmCompiler rationale and corrects wording in Time.
  • Preserves suppression names, ordering, dependency versions, and behavior.
File Description
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​Validation.kt Documents suppression rationales.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​ToolBase.kt Documents suppression rationales.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​Time.kt Corrects rationale wording.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​TestLib.kt Documents naming suppression.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​Spine.kt Documents suppression rationales.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​Reflect.kt Documents naming suppression.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​Logging.kt Documents suppression rationales.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​CoreJvmCompiler.kt Documents unused suppression.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​CoreJvm.kt Documents object-level suppressions.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​Change.kt Documents naming suppression.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​BaseTypes.kt Documents naming suppression.
buildSrc/​src/​main/​kotlin/​io/​spine/​dependency/​local/​Base.kt Documents suppression rationales.

Review effort: Balanced

@alexander-yevsyukov
alexander-yevsyukov merged commit ef3597f into master Oct 16, 2026
3 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the document-local-suppressions branch October 16, 2026 21:52
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants