Fork me on GitHub
#clj-kondo
<
2019-09-25
>
Saikyun07:09:28

@borkdude what paths are actually needed for clj-kondo? 🙂 see this: https://github.com/thheller/shadow-cljs/issues/558#event-2643788138

Saikyun07:09:55

thheller asked: > Does clj-kondo really require the full classpath? Wouldn't the actual :source-paths suffice?

Saikyun07:09:09

I thought clj-kondo wanted all the things, but I don't know

borkdude07:09:18

It depends. If you lint your libraries then clj-kondo knows about arities and other information about library functions. If it doesn't know about them, it won't emit warnings when you call them incorrectly.

Saikyun07:09:09

okay, thanks. so then it is useful to cache your libraries as well 🙂

sogaiu11:09:20

@borkdude i'm investigating the idea of generating TAGS / tags files using clj-kondo analysis data, but iiuc, there are few pieces of info that don't get picked up (or stored at any rate). the motivation is that, iiuc, clj-kondo understands clojure source better than the various ctags implementations so it ought to be able to index better. the two thoughts that come up are: 1) using the analysis data, revisit all of the relevant files to collect the info -OR- 2) is there some way to hook into / customize clj-kondo's process of visiting files so that the data might be collected in a customized fashion? the missing pieces for the etags version of TAGS are, iiuc, for each identifier: * some text preceding the identifier (as well as the identifier) also get stored separately from the identifier. e.g. for a namespace clojure.core, that text might be:

(ns ^{:doc "The core Clojure language."
       :author "Rich Hickey"}
  clojure.core
for a function definition for start, it might be:
(defn start
* the byte-offset of the beginning of that text from the beginning of the file it lives in cf: https://en.wikipedia.org/wiki/Ctags#Tags_file_formats (i haven't really digested what's needed for the other ctags tags formats yet as my initial interest is getting something working with emacs.) any thoughts?

borkdude11:09:01

I'll take a look later, I'm on a plane right now and can't visit many links. Please document what is required to the analysis output in a GH issue

sogaiu11:09:21

tnx, will do