Skip to content

linter doesn't mark missing "joker" symbols when the dialect isn't joker #33

@nicwest

Description

@nicwest

I'm not sure if this expected behaviour but when I have a clojure file like this:

;foo.clj
(ns foobar.core)

(joker.string/split "ha-ha-ha-ha" #"-")

and I run the linter I get no errors:

$ joker --lint foo.clj
$ joker --lintclj foo.clj

If I introduce an error by removing the pattern from the original example:

;foo.clj
(ns foobar.core)

(joker.string/split "ha-ha-ha-ha")

you get joker errors

$ joker --lint foo.clj
foo.clj:4:1: Parse warning: Wrong number of args (1) passed to #'joker.string/split
$ joker --lintclj foo.clj
foo.clj:4:1: Parse warning: Wrong number of args (1) passed to #'joker.string/split

I'm expecting something along the lines of this when I lint this clojure file as the joker dialect:

;foo.clj
(ns foo.core)

(clojure.string/split "ha-ha-ha-ha" #"-")
$ joker --lintjoker input.clj
input.clj:4:2: Parse error: Unable to resolve symbol: clojure.string/split

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions