clj-kondo

https://github.com/clj-kondo/clj-kondo
2020-05-16T16:01:19.202500Z

I'm trying to get the right config.edn for a pedestal macro defroutes

2020-05-16T16:01:36.202600Z

2020-05-16T16:03:38.203Z

2020-05-16T16:03:50.203500Z

gives me an unsatisfying [Error - 12:03:11 PM] <http://java.io|java.io>.PrintWriter@3bb7d04d error

borkdude 2020-05-16T16:19:18.203900Z

@gerred

(ns foo
  {:clj-kondo/config '{:linters
                       {:unresolved-symbol
                        {:exclude [(io.pedestal.http.route.definition/defroutes)]}}}}
  (:require [io.pedestal.http.route.definition :refer [defroutes]]))

(defroutes x)

2020-05-16T16:19:38.204200Z

ah ha.

2020-05-16T16:19:42.204400Z

thank you!

borkdude 2020-05-16T16:19:52.204900Z

btw, I don't know this macro, but if it's similar to compojure/defroutes, you could try lint-as

borkdude 2020-05-16T16:20:03.205100Z

because there is built-in support for compojure

borkdude 2020-05-16T16:20:12.205300Z

but I bet it isn't

2020-05-16T16:20:34.205600Z

yeah pedestal takes a different structure

vinnyataide 2020-05-16T16:48:29.206200Z

@gerred still showing the unsatisfying error here

2020-05-16T17:06:00.207200Z

really? it's working for me now. I did have to (declare routes) to make my var quote work

kari 2020-05-16T17:15:09.208200Z

I was reading some old posts and I understood that LSP is the preferred method to configure clj-kondo with IntelliJ IDEA (and not File Watcher)?

2020-05-16T18:03:28.208700Z

Clj-kondo does not work in ClojureScript correct?

2020-05-16T18:03:48.209300Z

If you wanted say a browser editor to support some of its linting?

borkdude 2020-05-16T18:04:29.209600Z

@kari.marttila just choose the one that works

borkdude 2020-05-16T18:04:40.209900Z

@didibus clj-kondo is JVM only

2020-05-16T18:04:52.210100Z

Ok thx

borkdude 2020-05-16T18:05:15.210600Z

@didibus however, I made this: https://clj-kondo.michielborkent.nl/ - it's calling clj-kondo as a service

2020-05-16T18:06:37.211500Z

Hum, ya I guess that can be an option. I was hoping to have a static website for this though, no server involved.

2020-05-16T18:06:54.212100Z

Now just waiting for GraalVM to have a native WASM target 😋

bhaim123 2020-05-16T18:23:19.212800Z

Hi Guys I'm facing an issue that maybe you already had. I have the same macro, defined in several project in different name spaces (I know it is bad, but this is the current state). (the macro is the if-let* so you can said it should be identified like the let macro). I'm trying to have one "global" config for all the projects. Not sure how to do this, was thinking about the lint-at section, but since the location of the macro in each project is different, I'm not sure it is possible. Any idea?

borkdude 2020-05-16T18:42:10.213200Z

@bhaim123 you can just put multiple lint-as entries for each different namespace?

bhaim123 2020-05-16T18:44:41.214800Z

@borkdude thanks for helping! I prefer not to do that since we have many different project and it will make the config really ugly 🙂

borkdude 2020-05-16T18:45:25.215200Z

then use a different config for each project. I don't see anything in between those approaches

bhaim123 2020-05-16T18:45:43.215400Z

👍

kari 2020-05-16T19:09:48.215500Z

Thanks! clj-kondo is a great tool - very popular at Metosin.

borkdude 2020-05-16T19:11:06.215700Z

Thanks!