Skip to content

:redundant-ignore false positive for finding from hook #2433

@lread

Description

@lread
  • I have read the Clojure etiquette and will respect it when communicating on this platform.

version

$ clj-kondo --version
clj-kondo v2024.11.14

macro usage
Maybe kinda related.

platform
All

problem
On Etaoin, I noticed that clj-kondo is falsely reporting :redundant-ignores.
The issue seems to be related to custom linters in clj-kondo hooks.

repro
I made a minimal repro: https://github.com/lread/repro-kondo-redundant-ignore-custom-linter

git clone https://github.com/lread/repro-kondo-redundant-ignore-custom-linter
cd repro-kondo-redundant-ignore-custom-linter
clj-kondo --lint src

actual behavior
clj-kondo reports:

src/foobar/baz.clj:16:3: info: Redundant ignore
src/foobar/baz.clj:21:8: error: How dare foo!
linting took 16ms, errors: 1, warnings: 0

expected behavior
I did not expect the redundant ignore.

See repro README for more details.

diagnosis
I did a little poking around and suspect it might have something to do with hooks and derived-data.

next steps
I'm happy to poke around further if that helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions