diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index fdabad5a..cb3bf631 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -333,22 +333,6 @@ jobs: with: args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintWithAjv/test" - linux_lintWithLizard_all: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845 - name: /lintWithLizard/all - with: - args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintWithLizard/all" - macos_lintWithLizard_all: - runs-on: macos-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac - - name: /lintWithLizard/all - run: nix-env -if . && m . /lintWithLizard/all - linux_secretsForEnvFromSops_example: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index fd5b62e8..edbbe47d 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -491,26 +491,6 @@ jobs: env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - linux_lintWithLizard_all: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845 - name: /lintWithLizard/all - with: - args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /lintWithLizard/all" - env: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - macos_lintWithLizard_all: - runs-on: macos-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac - - name: /lintWithLizard/all - run: nix-env -if . && m . /lintWithLizard/all - env: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - linux_secretsForEnvFromSops_example: runs-on: ubuntu-latest steps: diff --git a/docs/src/api/builtins/lint.md b/docs/src/api/builtins/lint.md index 4bea9763..31846a76 100644 --- a/docs/src/api/builtins/lint.md +++ b/docs/src/api/builtins/lint.md @@ -356,40 +356,3 @@ Example: ```bash m . /lintWithAjv/users ``` - -## lintWithLizard - -Using [Lizard](https://github.com/terryyin/lizard) to check -Ciclomatic Complexity and functions length -in all supported languages - -Types: - -- lintWithLizard (`attrsOf (listOf str)`): Optional. - Mapping of custom names to lists of paths (relative to the project) to lint. - - Defaults to `{ }`. - -Example: - -=== "makes.nix" - - ```nix - { - lintWithLizard = { - example1 = [ - "/" # Entire project - "/file.py" # A file - ]; - example2 = [ - "/directory" # A directory within the project - ]; - }; - } - ``` - -=== "Invocation" - - ```bash - $ m . /lintWithLizard/example1 - ``` diff --git a/makes.nix b/makes.nix index c76b119f..3eabe91f 100644 --- a/makes.nix +++ b/makes.nix @@ -157,7 +157,6 @@ }; }; }; - lintWithLizard = { all = [ "/" ]; }; lintWithAjv = { "test" = { schema = "/test/lint-with-ajv/schema.json"; diff --git a/makes/utils/makePythonLock/update.sh b/makes/utils/makePythonLock/update.sh index 2fdde77f..bb5bc900 100644 --- a/makes/utils/makePythonLock/update.sh +++ b/makes/utils/makePythonLock/update.sh @@ -32,10 +32,6 @@ function main { "${PWD}/src/args/lint-python-imports/pypi-deps.yaml" \ "${PWD}/src/args/lint-python-imports/pypi-sources.yaml" - "${cmd[@]}" 3.12 \ - "${PWD}/src/args/lint-with-lizard/dependencies.yaml" \ - "${PWD}/src/args/lint-with-lizard/sources.yaml" - : && "${cmd[@]}" 3.9 \ "${PWD}/src/args/make-python-pypi-environment/sources/numpy-1.24.0/dependencies.yaml" \ "${PWD}/src/args/make-python-pypi-environment/sources/numpy-1.24.0/sources-39.yaml" \ diff --git a/src/args/agnostic.nix b/src/args/agnostic.nix index b7851deb..e9a02d58 100644 --- a/src/args/agnostic.nix +++ b/src/args/agnostic.nix @@ -65,7 +65,6 @@ let lintPythonImports = import ./lint-python-imports/default.nix self; lintTerraform = import ./lint-terraform/default.nix self; lintWithAjv = import ./lint-with-ajv/default.nix self; - lintWithLizard = import ./lint-with-lizard/default.nix self; inherit (__nixpkgs__.lib.filesystem) listFilesRecursive; makeContainerImage = import ./make-container-image/default.nix self; makeDerivation = import ./make-derivation/default.nix self; diff --git a/src/args/lint-with-lizard/builder.sh b/src/args/lint-with-lizard/builder.sh deleted file mode 100644 index 9e40c33c..00000000 --- a/src/args/lint-with-lizard/builder.sh +++ /dev/null @@ -1,18 +0,0 @@ -# shellcheck shell=bash - -function main { - local lizard_max_warns='0' - local lizard_max_func_length='50' - local lizard_max_ccn='10' - local args=( - --ignore_warnings "${lizard_max_warns}" - --length "${lizard_max_func_length}" - --CCN "${lizard_max_ccn}" - ) - - info Linting with Lizard \ - && lizard "${args[@]}" "${envTarget}" \ - && touch "${out}" -} - -main "${@}" diff --git a/src/args/lint-with-lizard/default.nix b/src/args/lint-with-lizard/default.nix deleted file mode 100644 index 9a9edc0a..00000000 --- a/src/args/lint-with-lizard/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ makeDerivation, makeDerivationParallel, makePythonEnvironment, ... }: -{ targets, name, ... }: -let - makeTarget = envTarget: - makeDerivation { - env = { inherit envTarget; }; - name = "build-lint-with-lizard-for-${name}-${envTarget}"; - searchPaths = { - source = [ - (makePythonEnvironment { - pythonProjectDir = ./.; - pythonVersion = "3.11"; - }) - ]; - }; - builder = ./builder.sh; - }; -in makeDerivationParallel { - dependencies = builtins.map makeTarget targets; - name = "lint-with-lizard-for-${name}"; -} diff --git a/src/args/lint-with-lizard/poetry.lock b/src/args/lint-with-lizard/poetry.lock deleted file mode 100644 index 33a5fb38..00000000 --- a/src/args/lint-with-lizard/poetry.lock +++ /dev/null @@ -1,17 +0,0 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. - -[[package]] -name = "lizard" -version = "1.17.3" -description = "A code analyzer without caring the C/C++ header files. It works with Java, C/C++, JavaScript, Python, Ruby, Swift, Objective C. Metrics includes cyclomatic complexity number etc." -optional = false -python-versions = "*" -files = [ - {file = "lizard-1.17.3-py2.py3-none-any.whl", hash = "sha256:d7295be98d43d79cf4bb8daf0cdcdc2d32a238a3e4981a4adf9a628a8a3a1f9d"}, - {file = "lizard-1.17.3.tar.gz", hash = "sha256:21994effc04979e80973ae603f02ada19405a773e3aa55795fa952fbb6c0e894"}, -] - -[metadata] -lock-version = "2.0" -python-versions = "^3.11" -content-hash = "af97cbcfdabf4ef6a796bf0a6fa739f25df05f94b8bf2ff618b89087f700f726" diff --git a/src/args/lint-with-lizard/pyproject.toml b/src/args/lint-with-lizard/pyproject.toml deleted file mode 100644 index 4473cce9..00000000 --- a/src/args/lint-with-lizard/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "lint-with-lizard" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.11" -lizard = "1.17.3" - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/src/evaluator/modules/default.nix b/src/evaluator/modules/default.nix index 65136c2e..caaaa12a 100644 --- a/src/evaluator/modules/default.nix +++ b/src/evaluator/modules/default.nix @@ -25,7 +25,6 @@ (import ./lint-python/default.nix args) (import ./lint-terraform/default.nix args) (import ./lint-with-ajv/default.nix args) - (import ./lint-with-lizard/default.nix args) (import ./pipelines/default.nix args) (import ./secrets-for-aws-from-env/default.nix args) (import ./secrets-for-aws-from-gitlab/default.nix args) diff --git a/src/evaluator/modules/lint-with-lizard/default.nix b/src/evaluator/modules/lint-with-lizard/default.nix deleted file mode 100644 index 5c4c25ee..00000000 --- a/src/evaluator/modules/lint-with-lizard/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ __toModuleOutputs__, lintWithLizard, projectPath, ... }: -{ config, lib, ... }: -let - makeOutput = name: targets: { - name = "/lintWithLizard/${name}"; - value = lintWithLizard { - inherit name; - targets = builtins.map projectPath targets; - }; - }; -in { - options = { - lintWithLizard = lib.mkOption { - default = { }; - type = lib.types.attrsOf (lib.types.listOf lib.types.str); - }; - }; - config = { outputs = __toModuleOutputs__ makeOutput config.lintWithLizard; }; -}