Skip to content

Commit

Permalink
Add clj-kondo script + build step (athensresearch#38)
Browse files Browse the repository at this point in the history
* Ignore Emacs and Mac specific files

* Add clj-kondo

Config copied from https://github.com/borkdude/clj-kondo/blob/554d7d93e2eb78ff21cfbbee4a084c4b6e089411/.clj-kondo/config.edn

* Add Lint build step

* Don’t need maven deps for clj-kondo

* Allow clj-kondo warnings for now

* Add TODO for when all warnings are fixed
  • Loading branch information
jeroenvandijk committed May 8, 2020
1 parent 0e0abb6 commit c5eb0a1
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .clj-kondo/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{:linters {:unused-namespace
{:exclude [clj-kondo.impl.rewrite-clj-patch
rewrite-clj.parser.core
clj-kondo.impl.var-info-gen
clj-kondo.impl.node.seq
clj-kondo.impl.profiler]}
:unresolved-symbol
{:exclude [(clj-kondo.impl.utils/one-of)]}
:unused-referred-var
{:exclude {clojure.test [is deftest testing]}}
:type-mismatch
{:level :warning
:namespaces
{clj-kondo.core {print! {:arities {1 {:args [:map]
:ret :nil}}}
run! {:arities {1 {:args [:map]
:ret :map}}}}
clj-kondo.impl.config #include "../src/clj_kondo/impl/config.types.edn"
clj-kondo.impl.findings #include "../src/clj_kondo/impl/findings.types.edn"}}
:missing-docstring {:level :off}
:unsorted-required-namespaces {:level :warning}}
:lint-as {me.raynes.conch/programs clojure.core/declare
me.raynes.conch/let-programs clojure.core/let}
:output {:exclude-files ["src/clj_kondo/impl/rewrite_clj_patch.clj"]}}
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,21 @@ jobs:
- name: Run tests
run: |
script/test/jvm
lint:
# ubuntu 18.04 comes with lein + java8 installed
runs-on: ubuntu-18.04
steps:
- name: Git checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: 'true'

- uses: DeLaGuardo/setup-clj-kondo@v1
with:
version: '2020.04.05'

- name: Lint
run: |
script/lint
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@
# shadow-cljs cache, port files
/.shadow-cljs/
.idea/

.clj-kondo/.cache

# Mac OS files
.DS_Store

# Emacs files
.#*
9 changes: 9 additions & 0 deletions script/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -eo pipefail

# Find installation instructions here https://github.com/borkdude/clj-kondo/blob/554d7d93e2eb78ff21cfbbee4a084c4b6e089411/doc/install.md

# TODO remove this when all warnings have been fixed
clj-kondo --lint src || echo "
[FIXME] fix above warnings and remove this warning"

0 comments on commit c5eb0a1

Please sign in to comment.