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

Case bug in https://github.com/dm3/clojure.java-time/blob/master/src/java_time/format.clj#L32 #97

Closed
orestis opened this issue Feb 5, 2023 · 1 comment

Comments

@orestis
Copy link

orestis commented Feb 5, 2023

@borkdude and myself were discussing adding a linter to clj-kondo about case statements with symbol arguments, and during some code searches we found this:

https://github.com/dm3/clojure.java-time/blob/master/src/java_time/format.clj#L32

(defn- get-resolver-style [s]
  (cond-> s
    (not (instance? ResolverStyle s))
    (case
      :strict ResolverStyle/STRICT
      :smart ResolverStyle/SMART
      :lenient ResolverStyle/LENIENT)))

The case statement should probably start with s as the first argument :)

@orestis
Copy link
Author

orestis commented Feb 5, 2023

Whoops! Our carve logic didn't quite work :) Disregard please!

@orestis orestis closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2023
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