diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 77839aef..fdabad5a 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -199,22 +199,6 @@ jobs: - name: /lintBash run: nix-env -if . && m . /lintBash - linux_lintClojure_test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845 - name: /lintClojure/test - with: - args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintClojure/test" - macos_lintClojure_test: - runs-on: macos-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac - - name: /lintClojure - run: nix-env -if . && m . /lintClojure/test - linux_lintGitCommitMsg: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index fbd53f20..fd5b62e8 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -325,26 +325,6 @@ jobs: env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - linux_lintClojure_test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845 - name: /lintClojure/test - with: - args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintClojure/test" - env: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - macos_lintClojure_test: - runs-on: macos-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac - - name: /lintClojure - run: nix-env -if . && m . /lintClojure/test - env: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - linux_lintGitCommitMsg: runs-on: ubuntu-latest steps: diff --git a/docs/src/api/builtins/lint.md b/docs/src/api/builtins/lint.md index f7c23649..4bea9763 100644 --- a/docs/src/api/builtins/lint.md +++ b/docs/src/api/builtins/lint.md @@ -37,41 +37,6 @@ Example: m . /lintBash ``` -## lintClojure - -Lints clojure code with [clj-kondo](https://github.com/clj-kondo/clj-kondo). - -Types: - -- lintClojure (`attrsOf (listOf str)`): Optional. - Mapping of custom names to lists of paths (relative to the project) to lint. - - Defaults to `{ }`. - -Example: - -=== "makes.nix" - - ```nix - { - lintClojure = { - example1 = [ - "/" # Entire project - "/file.clj" # A file - ]; - example2 = [ - "/directory" # A directory within the project - ]; - }; - } - ``` - -=== "Invocation" - - ```bash - m . /lintClojure/example1` - ``` - ## lintGitCommitMsg It creates a commit diff diff --git a/makes.nix b/makes.nix index 4352e934..93287bf5 100644 --- a/makes.nix +++ b/makes.nix @@ -205,5 +205,4 @@ }; }; }; - lintClojure = { test = [ "/test" ]; }; } diff --git a/src/args/agnostic.nix b/src/args/agnostic.nix index 0b39b7a9..84078f6a 100644 --- a/src/args/agnostic.nix +++ b/src/args/agnostic.nix @@ -58,7 +58,6 @@ let inherit (__nixpkgs__.stdenv) isDarwin; inherit (__nixpkgs__.stdenv) isLinux; libGit = import ./lib-git/default.nix self; - lintClojure = import ./lint-clojure/default.nix self; lintGitCommitMsg = import ./lint-git-commit-msg/default.nix self; lintGitMailMap = import ./lint-git-mailmap/default.nix self; lintNix = import ./lint-nix/default.nix self; diff --git a/src/args/lint-clojure/builder.sh b/src/args/lint-clojure/builder.sh deleted file mode 100644 index 56c3ccd2..00000000 --- a/src/args/lint-clojure/builder.sh +++ /dev/null @@ -1,13 +0,0 @@ -# shellcheck shell=bash - -function main { - local args=( - --lint - ) - - info Linting Clojure solution \ - && clj-kondo "${args[@]}" "${envTarget}" \ - && touch "${out}" -} - -main "${@}" diff --git a/src/args/lint-clojure/default.nix b/src/args/lint-clojure/default.nix deleted file mode 100644 index b93776aa..00000000 --- a/src/args/lint-clojure/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ __nixpkgs__, makeDerivation, makeDerivationParallel, ... }: -{ targets, name, ... }: -let - makeTarget = envTarget: - makeDerivation { - env = { inherit envTarget; }; - name = "build-lint-clojure-for-${name}-${envTarget}"; - searchPaths.bin = [ __nixpkgs__.clj-kondo ]; - builder = ./builder.sh; - }; -in makeDerivationParallel { - dependencies = builtins.map makeTarget targets; - name = "lint-clojure-for-${name}"; -} diff --git a/src/evaluator/modules/default.nix b/src/evaluator/modules/default.nix index 90961d03..a06cbbbd 100644 --- a/src/evaluator/modules/default.nix +++ b/src/evaluator/modules/default.nix @@ -21,7 +21,6 @@ (import ./hello-world/default.nix args) (import ./inputs/default.nix) (import ./lint-bash/default.nix args) - (import ./lint-clojure/default.nix args) (import ./lint-git-commit-msg/default.nix args) (import ./lint-git-mailmap/default.nix args) (import ./lint-nix/default.nix args) diff --git a/src/evaluator/modules/lint-clojure/default.nix b/src/evaluator/modules/lint-clojure/default.nix deleted file mode 100644 index 9ac899d6..00000000 --- a/src/evaluator/modules/lint-clojure/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ __toModuleOutputs__, lintClojure, projectPath, ... }: -{ config, lib, ... }: -let - makeOutput = name: targets: { - name = "/lintClojure/${name}"; - value = lintClojure { - inherit name; - targets = builtins.map projectPath targets; - }; - }; -in { - options = { - lintClojure = lib.mkOption { - default = { }; - type = lib.types.attrsOf (lib.types.listOf lib.types.str); - }; - }; - config = { outputs = __toModuleOutputs__ makeOutput config.lintClojure; }; -} diff --git a/test/clojure/test.clj b/test/clojure/test.clj deleted file mode 100644 index e69de29b..00000000