0

I am using a defrecord form to define a type in Clojure:

(defrecord HideTableColumnMarker [columns-resize]
  ControlMarker)

But I am not happy with the default factory function function from the defrecord form, so I overwrite it with my own implementation to provide a 0-arity:

(defn ->HideTableColumnMarker
  ([] (HideTableColumnMarker. :cut))
  ([x] (HideTableColumnMarker. x)))

Running clj-kondo gives a redefined-var error:

src/stencil/types.clj:28:1: warning: redefined var #'stencil.types/->HideTableColumnMarker

Which makes sense but I did it on purpose. I have tried to undef the var from the namespace before the defn form but the warning message remains. How can I fix the warning without changing the configuration for clj-kondo?

erdos
  • 3,135
  • 2
  • 16
  • 27

1 Answers1

1

You could try #_:clj-kondo/ignore before the defn, which should ignore all warnings in the following expression.

See the clj-kondo docs

dorab
  • 807
  • 5
  • 13