Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work out how to suppress :suspicious-expression warning for schema defrecord #39

Open
NoxHarmonium opened this issue Jul 14, 2022 · 0 comments

Comments

@NoxHarmonium
Copy link
Owner

lein eastwood throws:

src/nanoweave/ast/literals.clj:1:1: suspicious-expression: dissoc called with 1 args. (dissoc map) always returns map. Perhaps there are misplaced parentheses?

I tried suppressing it with something like:

(disable-warning
 {:linter :suspicious-expression
  :for-macro 'clojure.core/dissoc
  :if-inside-macroexpansion-of #{'schema.core/defrecord}
  :within-depth 20
  :reason "The defrecord macro expands to a redundant (but harmless) dissoc statement when creating a record with no attributes (in this case NilLit)."})

or by using the :ignored-faults option but nothing will work so I've surpassed that whole linter with

:exclude-linters

Hopefully one day I can work out the correct syntax or raise an issue with Eastwood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant