Linting: Github Actions

clj-kondo provides static analysis of Clojure, ClojureScript and EDN code, which can be run on the command line to analyze a specific file or directory tree of files.

Lint a specific file on push or pr

The practicalli/clojure-deps-edn contains a deps.edn file that should be checked when ever there is a push to the live branch or a pull request is raised.

The configuration runs clj-kondo lint command using the DeLaGuardo/setup-clj-kondo@v1 GitHub action.

The jobs run on a GitHub Actions Ubuntu server. The first step installs clj-kondo on the runner. Then next step checks out the practicalli/clojure-deps-edn repository. The final step runs the lint command.

name: "Lint with clj-kondo"
      - live

    runs-on: ubuntu-20.04
    - uses: DeLaGuardo/setup-clj-kondo@v1
        version: '2020.04.05'

    - uses: actions/checkout@v2.3.3

    - name: Run clj-kondo on ubuntu
      run: clj-kondo --lint deps.edn

Example run of GitHub Actions

Pushing a commit will automatically trigger the workflow and lint the deps.edn file.

GitHub Actions: Linting run passing

When a pull request is created, the workflow is triggered and the results shown in the pull request page.

results matching ""

    No results matching ""