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

Translate :clj-kondo config expressed in Leiningen project maps #9

Merged
merged 2 commits into from
Jul 1, 2022

Conversation

vemv
Copy link
Contributor

@vemv vemv commented Jul 1, 2022

Closes #8

The feature can be tested out like so:

diff --git a/project.clj b/project.clj
index 8a50fb1..a1fa9cb 100644
--- a/project.clj
+++ b/project.clj
@@ -6,6 +6,7 @@
   :eval-in-leiningen true
   :pedantic? :warn
   :dependencies [[clj-kondo/clj-kondo "2022.06.22"]]
+  :clj-kondo {:config {:linters {:docstring-leading-trailing-whitespace {:level :warning}}}}
   :deploy-repositories [["clojars" {:url "https://clojars.org/repo"
                                     :username :env/clojars_username
                                     :password :env/clojars_password
diff --git a/src/leiningen/clj_kondo.clj b/src/leiningen/clj_kondo.clj
index a97e353..344c1f8 100644
--- a/src/leiningen/clj_kondo.clj
+++ b/src/leiningen/clj_kondo.clj
@@ -23,7 +23,10 @@
     (when-not (zero? exit-status)
       (lein-core/exit exit-status))))
 
-(defn parse-additional [project options]
+(defn parse-additional
+  "Hello
+  "
+  [project options]
   (mapv (fn [option]
           (if (= "$classpath" option)
             (lein-classpath/get-classpath-string project)
$ lein clj-kondo
/Users/vemv/lein-clj-kondo/src/leiningen/clj_kondo.clj:27:3: warning: Docstring should not have leading or trailing whitespace.
linting took 99ms, errors: 0, warnings: 1

Cheers - V

@borkdude borkdude merged commit 7101c94 into clj-kondo:master Jul 1, 2022
@borkdude
Copy link
Member

borkdude commented Jul 1, 2022

I expect that you'd like a new release, right?

@vemv vemv deleted the 8--config branch July 1, 2022 11:14
@vemv
Copy link
Contributor Author

vemv commented Jul 1, 2022

Correct, thanks!

@borkdude
Copy link
Member

borkdude commented Jul 1, 2022

0.2.1 released

@borkdude
Copy link
Member

borkdude commented Jul 1, 2022

@vemv Would you be so kind to make a PR with updated changelogs? I forgot to ask this in this PR.

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

Successfully merging this pull request may close these issues.

Global configuration as resource
2 participants