Skip to content

Commit

Permalink
Linting also about constructors with too many parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomassetti committed Aug 2, 2014
1 parent 0b1c320 commit c206ff4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/linter.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
(defrecord Check [operation params message])

(def checks
[(Check. classesWithManyConstructorsOp {:threshold 4} "This class has too many constructors (#1#). Considers the Builder pattern")])
[(Check. classesWithManyConstructorsOp {:threshold 4}
"This class has too many constructors (#1#). Consider using static factory methods or the Builder pattern")
(Check. constructorsWithManyParametersOp {:threshold 6}
"This constructor has too many parameters (#1#). Consider using the Builder pattern")])

(defn replaceParamsInMessage [message result]
(clojure.string/replace message "#1#" (toString (nth result 1))))
Expand Down

0 comments on commit c206ff4

Please sign in to comment.