Fork me on GitHub
#clj-kondo
<
2020-06-29
>
reefersleep06:06:55

Hello @borkdude 🙂 I am trying out super-linter with

VALIDATE_ALL_CODEBASE: false
          VALIDATE_CLOJURE: true
, and, curiously, it seems to pick up and validate e.g. YAML and JSON files are validated. That’s one issue; I thought that, according to the super-linter docs, once you turn on a specific validator, you turn off the rest. It’s not my real issue, though. My real problem is the following:
File:[project/src/my_ns.clj]
  - WARN! Failed to get filetype for:[project/src/my_ns.clj]!

reefersleep06:06:12

Have you seen anything like that before?

reefersleep06:06:12

I wanted to ask at the #super-linter channel on whatever medium, but there is none linked at the super-linter github repo.

reefersleep06:06:12

So, sorry to bother you about what I guess is essentially not a problem with clj-kondo 😅 Just thought you might have some input regardless.

eskos06:06:43

super-linter is GitHub’s native tool (the repo is owned by GitHub itself, in case you missed that) so you probably should ask through the repo’s Issues about that one.

reefersleep08:06:19

Thanks @suomi.esko. I thought it’d be a bit much to ask via something like Issues when I had no clue whether there was an error in the code or an error in my thinking. Maybe this is customary, though? I tend to ask more informally first, like in Slack 🙂

borkdude08:06:03

That's fine

reefersleep08:06:54

Which one? Asking in Issues when I don’t know if the Issue is actually with the code? 🙂

borkdude08:06:30

Asking everywhere is fine with me. But super-linter is so new that you probably have the most luck at the repo itself

👍 3
borkdude07:06:41

@reefersleep Yes, like @suomi.esko, it's probably best if you post an issue there. Do you know which version you are running? The version with clj-kondo in it might not be published yet, it came after 2.2.0

reefersleep08:06:41

@borkdude I don’t understand that; the version I tried was 2.2.0, the documentation mentioned Clojure at that point. In any case, I bumped it to 2.2.2, and that didn’t work either. A colleague of mine pointed out the error in the lib/linter.sh script, and I opened up a PR which hopefully fixes the problem: https://github.com/github/super-linter/pull/300/files

borkdude08:06:16

2.2.2 was a typo, I meant 2.2.0, I don't think there is a newer published version yet

slimslenderslacks15:06:26

@reefersleep speaking of super-linter, the company I'm at is also going to provide similar support for running clj-kondo. If you're interested in trying it, it's available at https://go.atomist.com/catalog/skills/atomist/clj-kondo-skill (also requires that you install a GitHub app). We're focusing on enabling tools to run on events, and then push data back to be evaluated by other functions. Ultimately, we're working towards being able to say things like "IF clj-kondo had no violations, AND the security check passed, AND the unit tests succeeded, THEN ...). IFTTT for delivery so to speak

🤓 6
borkdude15:06:59

Looks interesting

slimslenderslacks15:06:17

@borkdude one of the things I've been excited about is the possibility of potentially sharing configurations across Repos.

borkdude15:06:36

Feel free to submit to the docs once you're ready. Maybe https://github.com/borkdude/clj-kondo/blob/master/doc/ci-integration.md is a good place for it

borkdude15:06:18

@slimslenderslacks That's cool. Can you also share code files that are necessary for hooks (which is a new feature)?

slimslenderslacks15:06:30

Will do, thanks! The code that we run is here: https://github.com/atomist-skills/clj-kondo-skill/blob/master/src/atomist/main.cljs. I actually had not thought about hooks but these things have parameters (https://github.com/atomist-skills/clj-kondo-skill/blob/master/skill.edn#L28) so probably could look at ways to share hooks too. That's really interesting.

slimslenderslacks15:06:50

The first thing that interested me was using public urls (e.g gist urls) to share configurations between teams. Among our own clojure repos, that certainly helps us.

slimslenderslacks15:06:12

And that kind of sharing was easy to add. It seems to me like there could be value in sharing libraries of linter rules anyway. I'll take a look at hooks as well.

slimslenderslacks15:06:45

Right! So one of the things we've added is the ability to reference a config by url. So, for slingshot, we could pull in for all projects that have slingshot in the CP.

slimslenderslacks15:06:33

I don't have an instinct for how practical this is.

borkdude15:06:07

That could work, but what about the code in the slingshot dir?

slimslenderslacks16:06:09

I see ... if the config has hooks, you really would have to be able to pull down the hook code too. So if I was a library owner, I could ship a config.edn, AND hook code to users of my library.

borkdude16:06:36

clj-kondo doesn't automatically import that (right now) so you have to copy that code yourself to your own .clj-kondo

slimslenderslacks16:06:24

I'll see if I can get this to work on the serverless runner. So far, it seems like it should be possible to merge several libraries by referencing their github coords.

borkdude16:06:13

clj-kondo has a merge-configs API function to merge configs btw

👍 3