Skip to content

Mismatch between spec for (ns) and clj-kondo linting #2473

@NoahTheDuke

Description

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

version

clj-kondo v2025.01.16

platform

Native, OSX

problem

Certain incorrect (ns) forms aren't diagnosed as incorrect by clj-kondo, even tho they're covered by clojure's core specs.

(ns example
  [java.awt.image BufferedImage]
  [javax.imageio ImageIO]
  [java.io File])
$ clj-kondo --lint example.clj
linting took 40ms, errors: 0, warnings: 0
$ clojure -M example.clj
Syntax error macroexpanding clojure.core/ns at (example.clj:1:1).
([java.awt.image BufferedImage] [javax.imageio ImageIO] [java.io File]) - failed: Extra input spec: :clojure.core.specs.alpha/ns-form

Full report at:
/var/folders/mp/l5hpkwss6p749m_74mk2ksl80000gn/T/clojure-5250480099384266557.edn

expected behavior

(ns) forms should be linted according to the clojure core specs (as well as the various existing clj-kondo lints).

I'm willing to attempt the fix here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions