cljfmt icon indicating copy to clipboard operation
cljfmt copied to clipboard

Support for variable naming / casing conventions

Open ccann opened this issue 7 years ago • 2 comments

I think it would be awesome if cljfmt had a feature where it would detect/fix bad var casing, e.g.:

(deftype serviceRef
    ...)

(defn addOne
  [myNum]
  (inc myNum))

;; =>

(deftype ServiceRef
    ...)

(defn add-one
  [my-num]
  (inc my-num))

ccann avatar Mar 20 '17 15:03 ccann

This seems quite intrusive, and it's not obvious to me when fooBar would become FooBar and when foo-bar.

@weavejester: can you weigh in on whether this might be in scope at all?

or avatar May 10 '22 06:05 or

I think this is within scope, though it may be difficult to achieve, as it would require knowing whether a symbol is within the project being checked, and know what bindings are local and which are global. It's possible though, and seems useful.

weavejester avatar May 12 '22 22:05 weavejester