jonase / eastwood

Clojure lint tool
1.09k stars 66 forks source link

data_readers.cljc is not properly excluded #447

Closed aldazosa closed 1 year ago

aldazosa commented 1 year ago

I'm encountering a problem when using tagged literals from clj and cljs via a .cljc file with Eastwood. Currently, Eastwood is generating the following warning:

src/cljc/data_readers.cljc:1:1: no-ns-form-found: No 'ns' form was found in the file 'src/cljc/data_readers.cljc'. Consequently, it will not be linted.

Upon investigating the source code for eastwood.linters.misc/no-ns-form-found-files, it seems that the exclusion for the "no-ns-form-found" warning applies to the Clojure version of the data readers but not the .cljc file.

Steps to Reproduce:

  1. Create a data_readers.cljc file with a map used for tagged literals.
  2. Run Eastwood linting.
  3. A no namespace warning is shown in the results.

Expected Behavior:

data_readers.cljc file should be excluded (similar to the Clojure version) and not trigger the "no-ns-form-found" warning.

Actual Behavior:

The data_readers.cljc file generates the "no-ns-form-found" warning.

vemv commented 1 year ago

1.4.1 should be visible on https://clojars.org/jonase/eastwood within an hour.

Cheers - V