diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 439248ea..6a3c4bb9 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -1,3 +1,4 @@ +--- permissions: read-all concurrency: cancel-in-progress: true @@ -10,7 +11,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: __all__ with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . __all__" mac_all: runs-on: macos-latest @@ -29,7 +30,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /calculateScorecard" macos_calculatescorecard: runs-on: macos-latest @@ -48,7 +49,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /deployTerraform/module with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /deployTerraform/module" macos_deployTerraform_module: runs-on: macos-latest @@ -65,7 +66,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /dev/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /dev/example" macos_dev_example: runs-on: macos-latest @@ -82,7 +83,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /envVars/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /envVars/example" macos_envVars_example: runs-on: macos-latest @@ -99,7 +100,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatBash with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatBash" macos_formatBash: runs-on: macos-latest @@ -116,7 +117,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatMarkdown with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatMarkdown" linux_formatNix: @@ -126,7 +127,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatNix with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatNix" macos_formatNix: runs-on: macos-latest @@ -143,7 +144,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatPython with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatPython" macos_formatPython: runs-on: macos-latest @@ -160,7 +161,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatTerraform with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatTerraform" macos_formatTerraform: runs-on: macos-latest @@ -170,6 +171,23 @@ jobs: - name: /formatTerraform run: nix-env -if . && m . /formatTerraform + linux_formatYaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac + name: /formatYaml + with: + set-safe-directory: /github/workspace + args: sh -c "nix-env -if . && m . /formatYaml" + macos_formatYaml: + runs-on: macos-latest + steps: + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: cachix/install-nix-action@451e61183802597c1febd6ca3cf18aa163f93a06 + - name: /formatYaml + run: nix-env -if . && m . /formatYaml + linux_helloWorld: runs-on: ubuntu-latest steps: @@ -177,7 +195,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /helloWorld with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /helloWorld" macos_helloWorld: runs-on: macos-latest @@ -194,7 +212,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintBash with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintBash" macos_lintBash: runs-on: macos-latest @@ -211,7 +229,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintClojure/test with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintClojure/test" macos_lintClojure_test: runs-on: macos-latest @@ -230,7 +248,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintGitCommitMsg with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintGitCommitMsg" linux_lintGitMailMap: @@ -242,7 +260,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintGitMailMap with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintGitMailMap" macos_lintGitMailMap: runs-on: macos-latest @@ -259,7 +277,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintMarkdown/all with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintMarkdown/all" macos_lintMarkdown_all: runs-on: macos-latest @@ -276,7 +294,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintNix with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintNix" macos_lintNix: runs-on: macos-latest @@ -293,7 +311,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintPython/dirOfModules/makes with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintPython/dirOfModules/makes" macos_lintPython_dirOfModules_makes: runs-on: macos-latest @@ -310,7 +328,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintPython/dirOfModules/makes/main with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintPython/dirOfModules/makes/main" macos_lintPython_dirOfModules_makes_main: runs-on: macos-latest @@ -327,7 +345,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintPython/imports/makes with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintPython/imports/makes" macos_lintPython_imports_makes: runs-on: macos-latest @@ -344,7 +362,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintPython/module/cliMain with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintPython/module/cliMain" macos_lintPython_module_cliMain: runs-on: macos-latest @@ -361,7 +379,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintTerraform/module with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintTerraform/module" macos_lintTerraform_module: runs-on: macos-latest @@ -378,7 +396,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintWithAjv/test with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintWithAjv/test" linux_lintWithLizard_all: @@ -388,7 +406,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintWithLizard/all with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintWithLizard/all" macos_lintWithLizard_all: runs-on: macos-latest @@ -405,7 +423,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /secretsForEnvFromSops/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /secretsForEnvFromSops/example" macos_secretsForEnvFromSops_example: runs-on: macos-latest @@ -422,7 +440,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /secretsForGpgFromEnv/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /secretsForGpgFromEnv/example" macos_secretsForGpgFromEnv_example: runs-on: macos-latest @@ -439,7 +457,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /securePythonWithBandit/cli with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /securePythonWithBandit/cli" macos_securePythonWithBandit_cli: runs-on: macos-latest @@ -456,7 +474,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /taintTerraform/module with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /taintTerraform/module" macos_taintTerraform_module: runs-on: macos-latest @@ -473,7 +491,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /testPython/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /testPython/example" macos_testPython_example: runs-on: macos-latest @@ -490,7 +508,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/calculateCvss3 with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/calculateCvss3" macos_tests_calculateCvss3: runs-on: macos-latest @@ -507,7 +525,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/makeSearchPaths with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/makeSearchPaths" macos_tests_makeSearchPaths: runs-on: macos-latest @@ -524,7 +542,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/makeTemplate with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/makeTemplate" macos_tests_makeTemplate: runs-on: macos-latest @@ -541,7 +559,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/scriptWithHelp with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/scriptWithHelp" macos_tests_scriptWithHelp: runs-on: macos-latest @@ -558,7 +576,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/secretsForGpgFromEnv with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/secretsForGpgFromEnv" macos_tests_secretsForGpgFromEnv: runs-on: macos-latest @@ -575,7 +593,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /testTerraform/module with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /testTerraform/module" macos_testTerraform_module: runs-on: macos-latest diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index c05f614c..b5da55b4 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -1,3 +1,4 @@ +--- concurrency: cancel-in-progress: true group: ${{ github.actor }} @@ -12,7 +13,7 @@ jobs: GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ github.token }} with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /deployContainerImage/makesGitHub" releaseGitHub: @@ -22,15 +23,15 @@ jobs: - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - uses: richardsimko/update-tag@5bd0e05b035e02d5da3768dbdcfc4e5e0908623e with: - tag_name: "22.08" + tag_name: '22.08' env: GITHUB_TOKEN: ${{ github.token }} - uses: johnwbyrd/update-release@1d5ec4791e40507e5eca3b4dbf90f0b27e7e4979 with: files: README.md - release: "22.08" + release: '22.08' prerelease: true - tag: "22.08" + tag: '22.08' token: ${{ github.token }} linux_all: runs-on: ubuntu-latest @@ -39,7 +40,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: __all__ with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . __all__" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -63,7 +64,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /calculateScorecard" macos_calculatescorecard: runs-on: macos-latest @@ -83,7 +84,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /deployTerraform/module with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /deployTerraform/module" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -104,7 +105,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /dev/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /dev/example" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -125,7 +126,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /envVars/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /envVars/example" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -146,7 +147,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatBash with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatBash" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -167,7 +168,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatMarkdown with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatMarkdown" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -179,7 +180,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatNix with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatNix" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -200,7 +201,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatPython with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatPython" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -221,7 +222,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /formatTerraform with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /formatTerraform" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -235,6 +236,27 @@ jobs: env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} + linux_formatYaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac + name: /formatYaml + with: + set-safe-directory: /github/workspace + args: sh -c "nix-env -if . && m . /formatYaml" + env: + CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} + macos_formatYaml: + runs-on: macos-latest + steps: + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: cachix/install-nix-action@451e61183802597c1febd6ca3cf18aa163f93a06 + - name: /formatYaml + run: nix-env -if . && m . /formatYaml + env: + CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} + linux_helloWorld: runs-on: ubuntu-latest steps: @@ -242,7 +264,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /helloWorld with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /helloWorld" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -263,7 +285,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintBash with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintBash" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -284,7 +306,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintClojure/test with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintClojure/test" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -307,7 +329,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintGitCommitMsg with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintGitCommitMsg" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -321,7 +343,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintGitMailMap with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintGitMailMap" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -342,7 +364,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintMarkdown/all with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintMarkdown/all" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -363,7 +385,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintNix with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintNix" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -384,7 +406,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintPython/dirOfModules/makes with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintPython/dirOfModules/makes" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -405,7 +427,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintPython/dirOfModules/makes/main with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintPython/dirOfModules/makes/main" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -426,7 +448,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintPython/imports/makes with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintPython/imports/makes" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -447,7 +469,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintPython/module/cliMain with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintPython/module/cliMain" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -468,7 +490,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintTerraform/module with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintTerraform/module" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -489,7 +511,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintWithAjv/test with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintWithAjv/test" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -501,7 +523,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /lintWithLizard/all with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /lintWithLizard/all" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -522,7 +544,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /secretsForEnvFromSops/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /secretsForEnvFromSops/example" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -543,7 +565,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /secretsForGpgFromEnv/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /secretsForGpgFromEnv/example" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -564,7 +586,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /securePythonWithBandit/cli with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /securePythonWithBandit/cli" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -585,7 +607,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /taintTerraform/module with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /taintTerraform/module" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -606,7 +628,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /testPython/example with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /testPython/example" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -627,7 +649,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/calculateCvss3 with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/calculateCvss3" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -648,7 +670,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/makeSearchPaths with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/makeSearchPaths" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -669,7 +691,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/makeTemplate with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/makeTemplate" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -690,7 +712,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/scriptWithHelp with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/scriptWithHelp" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -711,7 +733,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /tests/secretsForGpgFromEnv with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /tests/secretsForGpgFromEnv" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -732,7 +754,7 @@ jobs: - uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac name: /testTerraform/module with: - set-safe-directory: "/github/workspace" + set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /testTerraform/module" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} diff --git a/.github/workflows/scorecards-analysis.yaml b/.github/workflows/scorecards-analysis.yaml index 2681dc0d..2af6cefc 100644 --- a/.github/workflows/scorecards-analysis.yaml +++ b/.github/workflows/scorecards-analysis.yaml @@ -1,9 +1,10 @@ +--- name: Scorecards supply-chain security on: branch_protection_rule: schedule: # Weekly on Saturdays. - - cron: "30 1 * * 6" + - cron: 30 1 * * 6 push: branches: [main, master] @@ -20,27 +21,27 @@ jobs: contents: read steps: - - name: "Checkout code" + - name: Checkout code uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b with: persist-credentials: false - - name: "Run analysis" - uses: ossf/scorecard-action@c1aec4ac820532bab364f02a81873c555a0ba3a1 # v1.0.4 + - name: Run analysis + uses: ossf/scorecard-action@c1aec4ac820532bab364f02a81873c555a0ba3a1 # v1.0.4 with: results_file: results.sarif results_format: sarif repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} publish_results: true - - name: "Upload artifact" - uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2.3.1 + - name: Upload artifact + uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2.3.1 with: name: SARIF file path: results.sarif retention-days: 5 - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26 + - name: Upload to code-scanning + uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26 with: sarif_file: results.sarif diff --git a/.gitlab-ci.yaml b/.gitlab-ci.yaml index 28d7f7f5..abf073f4 100644 --- a/.gitlab-ci.yaml +++ b/.gitlab-ci.yaml @@ -1,3 +1,4 @@ +--- /helloWorld__1__2__3: image: ghcr.io/fluidattacks/makes:22.08 interruptible: true diff --git a/README.md b/README.md index c8efdc35..a05c13eb 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ Real life projects that run entirely on [Makes][MAKES]: - [formatNix](#formatnix) - [formatPython](#formatpython) - [formatTerraform](#formatterraform) + - [formatYaml](#formatyaml) - [Lint](#lint) - [lintBash](#lintbash) - [lintClojure](#lintclojure) @@ -1043,6 +1044,37 @@ Example `makes.nix`: Example invocation: `$ m . /formatTerraform` +### formatYaml + +Ensure that [YAML][YAML] code +is formatted according to [yamlfix][YAMLFIX]. + +Types: + +- formatYaml: + - enable (`boolean`): Optional. + Defaults to `false`. + - targets (`listOf str`): Optional. + Files or directories (relative to the project) to format. + Defaults to the entire project. + +Example `makes.nix`: + +```nix +{ + formatYaml = { + enable = true; + targets = [ + "/" # Entire project + "/main.yaml" # A file + "/yamls/" # A directory within the project + ]; + }; +} +``` + +Example invocation: `$ m . /formatYaml` + ## Lint Linters ensure source code follows @@ -5375,6 +5407,8 @@ Project leaders: [x86-64][X86_64] - [YAML]: https://yaml.org/ [YAML][YAML] +- [YAMLFIX]: https://github.com/lyz-code/yamlfix + [yamlfix][YAMLFIX] - [YQ]: https://github.com/mikefarah/yq [yq][YQ] - [YUM]: http://yum.baseurl.org/ diff --git a/makes.nix b/makes.nix index 00bb3c28..7d744c65 100644 --- a/makes.nix +++ b/makes.nix @@ -86,6 +86,10 @@ enable = true; targets = ["/"]; }; + formatYaml = { + enable = true; + targets = ["/"]; + }; helloWorld = { enable = true; name = "Jane Doe"; diff --git a/makes/cli/pypi/pypi-deps.yaml b/makes/cli/pypi/pypi-deps.yaml index e93413f7..d24eb5d1 100644 --- a/makes/cli/pypi/pypi-deps.yaml +++ b/makes/cli/pypi/pypi-deps.yaml @@ -1,2 +1,3 @@ -rich: "*" -textual: "*" +--- +rich: '*' +textual: '*' diff --git a/makes/cli/pypi/pypi-sources.yaml b/makes/cli/pypi/pypi-sources.yaml index 37b44587..27c93449 100644 --- a/makes/cli/pypi/pypi-sources.yaml +++ b/makes/cli/pypi/pypi-sources.yaml @@ -1,3 +1,4 @@ +--- closure: colorama: 0.4.4 commonmark: 0.9.1 @@ -20,4 +21,4 @@ links: - name: textual-0.1.12-py3-none-any.whl sha256: 0xr4cn53pv5skzk0h4vqp97y3caisx5wnvcq4l534lyg0v6fk59g url: https://files.pythonhosted.org/packages/12/95/330c20294045571906e2566fafbad2779f69e9605a05f70862cea7f81cec/textual-0.1.12-py3-none-any.whl -python: "3.9" +python: '3.9' diff --git a/makes/tests/makeTemplate/test.yaml b/makes/tests/makeTemplate/test.yaml index 7e314017..e0f560ef 100644 --- a/makes/tests/makeTemplate/test.yaml +++ b/makes/tests/makeTemplate/test.yaml @@ -1,11 +1,16 @@ -testTitle: > - ! # $ % & ' ( ) * + , - . / +--- +testTitle: >- + ! # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ € ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ Ž + + + + ‘ ’ “ ” • – — ˜ ™ š › œ ž Ÿ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ @@ -61,8 +66,7 @@ testTitle: > ϐ ϑ ϒ ϓ ϔ ϕ ϖ ϗ Ϙ ϙ Ϛ ϛ Ϝ ϝ Ϟ ϟ Ϡ ϡ Ϣ ϣ Ϥ ϥ Ϧ ϧ Ϩ ϩ Ϫ ϫ Ϭ ϭ Ϯ ϯ ‐ ‑ ‒ – — ― ‖ ‗ ‘ ’ ‚ ‛ “ ” „ ‟ - † ‡ • ‣ ․ ‥ … ‧   - ‰ ‱ ′ ″ ‴ ‵ ‶ ‷ ‸ ‹ › ※ ‼ ‽ ‾ ‿ + † ‡ • ‣ ․ ‥ … ‧   ‰ ‱ ′ ″ ‴ ‵ ‶ ‷ ‸ ‹ › ※ ‼ ‽ ‾ ‿ ⁀ ⁁ ⁂ ⁃ ⁄ ⁅ ⁆ ⁇ ⁈ ⁉ ⁊ ⁋ ⁌ ⁍ ⁎ ⁏ ⁐ ⁑ ⁒ ⁓ ⁔ ⁕ ⁖ ⁗ ⁘ ⁙ ⁚ ⁛ ⁜ ⁝ ⁞ ⁰ ⁱ ⁲ ⁳ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ⁿ diff --git a/makes/tests/secretsForGpgFromEnv/secrets.yaml b/makes/tests/secretsForGpgFromEnv/secrets.yaml index 4b067a05..b8bc45ce 100644 --- a/makes/tests/secretsForGpgFromEnv/secrets.yaml +++ b/makes/tests/secretsForGpgFromEnv/secrets.yaml @@ -1,30 +1,31 @@ +--- secret: ENC[AES256_GCM,data:KOuR,iv:Z1uEWs6+N4O10CpUOregxx6ejQidoAIHuFeJA+3RwE4=,tag:eKkb91u4ueSYd4cXZ4uFJg==,type:int] sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: [] - lastmodified: "2021-09-14T16:31:32Z" - mac: ENC[AES256_GCM,data:hSG3DPDaWM5iFpGI9hgjWCwWLDeiM9ZffvMq1sOn6HTiEhnECv5o3+lxWTD08kf2yq9zSAuuraSI7KUbQSLgJrrgD9lrDGeMYakp8Cg1z0Wukyc0aNWzPijOinFUx+RMZ3Thwu+x6vYDW+Q2OTZBwaAhUmsFES/oin86u/4PELw=,iv:LxdZIkXjIQXVOPSpkhQDUajXTAK5cyyA1tgdEtBKbPA=,tag:gZsKboxuEQh4XjTu9Ub6uQ==,type:str] - pgp: - - created_at: "2021-09-14T16:31:31Z" - enc: | - -----BEGIN PGP MESSAGE----- + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: [] + lastmodified: '2021-09-14T16:31:32Z' + mac: ENC[AES256_GCM,data:hSG3DPDaWM5iFpGI9hgjWCwWLDeiM9ZffvMq1sOn6HTiEhnECv5o3+lxWTD08kf2yq9zSAuuraSI7KUbQSLgJrrgD9lrDGeMYakp8Cg1z0Wukyc0aNWzPijOinFUx+RMZ3Thwu+x6vYDW+Q2OTZBwaAhUmsFES/oin86u/4PELw=,iv:LxdZIkXjIQXVOPSpkhQDUajXTAK5cyyA1tgdEtBKbPA=,tag:gZsKboxuEQh4XjTu9Ub6uQ==,type:str] + pgp: + - created_at: '2021-09-14T16:31:31Z' + enc: | + -----BEGIN PGP MESSAGE----- - hQGMA6RUVClfXUEDAQv9EyAANqoGd0/V6YP+B0cj7dwNEjYu9TSx+u5OZJ+a+ykc - ossITW0baHO777yTP0xrdVjkt3lWKlQ8JtRxGYBqM2uCkofLJHCDz7OA6vC8Seaz - cDdNXw518r2rl61Sw18ZdIUdjCGFlpICQhF/3V4tAiD9eP9wzGnoSxP3d5s81xJI - 5/e651dgofGrAXU+zkyqa6dt+yPRga6styQOE/kvW1mDGn7XKxrSZWUQ1JN3QNZA - bxIxN4Nkq6USHcnCzpmPQ+LPKo4jFqV2/A2fN0UTZUldV8rJaLj7xUKxJKDaQmsP - ZNLBk93vlxOe1/ZjF10bfjcKY/5Equ2+Jvm+gWJBp2Zgchtpkyyqt8RFct7hlDRP - cmOSSjW3ysXZy/LQqydm4p/TvnzcWB/2Lz7OHsYbWLI/5FnTpIrYAoWlqYVzvbPt - wfF4Jy1iT51DoGzd75PqInLLXRX7K3XZxSDmBvvc3Am45Zt7RXoDbfpke/BdAFnL - xhIxfcxVfr1d3xrQou1y0l4BtfqXqH6wQAaaVneHIB4CDTQfr2CMhKxhsv53FGWY - 3Nc46VLvhx13aHik1EvtUpQY2SssCpEjaAXbbfa/WMcnfktjLKERZmrI5aNpOaby - SOSXfwAnTkyexmADhogh - =ljLg - -----END PGP MESSAGE----- - fp: 7B11C92689AA50BE15563165B760FA0440E3769C - unencrypted_suffix: _unencrypted - version: 3.7.1 + hQGMA6RUVClfXUEDAQv9EyAANqoGd0/V6YP+B0cj7dwNEjYu9TSx+u5OZJ+a+ykc + ossITW0baHO777yTP0xrdVjkt3lWKlQ8JtRxGYBqM2uCkofLJHCDz7OA6vC8Seaz + cDdNXw518r2rl61Sw18ZdIUdjCGFlpICQhF/3V4tAiD9eP9wzGnoSxP3d5s81xJI + 5/e651dgofGrAXU+zkyqa6dt+yPRga6styQOE/kvW1mDGn7XKxrSZWUQ1JN3QNZA + bxIxN4Nkq6USHcnCzpmPQ+LPKo4jFqV2/A2fN0UTZUldV8rJaLj7xUKxJKDaQmsP + ZNLBk93vlxOe1/ZjF10bfjcKY/5Equ2+Jvm+gWJBp2Zgchtpkyyqt8RFct7hlDRP + cmOSSjW3ysXZy/LQqydm4p/TvnzcWB/2Lz7OHsYbWLI/5FnTpIrYAoWlqYVzvbPt + wfF4Jy1iT51DoGzd75PqInLLXRX7K3XZxSDmBvvc3Am45Zt7RXoDbfpke/BdAFnL + xhIxfcxVfr1d3xrQou1y0l4BtfqXqH6wQAaaVneHIB4CDTQfr2CMhKxhsv53FGWY + 3Nc46VLvhx13aHik1EvtUpQY2SssCpEjaAXbbfa/WMcnfktjLKERZmrI5aNpOaby + SOSXfwAnTkyexmADhogh + =ljLg + -----END PGP MESSAGE----- + fp: 7B11C92689AA50BE15563165B760FA0440E3769C + unencrypted_suffix: _unencrypted + version: 3.7.1 diff --git a/makes/utils/makeSopsEncryptedFile/template.yaml b/makes/utils/makeSopsEncryptedFile/template.yaml index f410f9ca..0e37a21d 100644 --- a/makes/utils/makeSopsEncryptedFile/template.yaml +++ b/makes/utils/makeSopsEncryptedFile/template.yaml @@ -1 +1,2 @@ +--- test_key: test_value diff --git a/src/args/agnostic.nix b/src/args/agnostic.nix index bcc37f82..3c94fd62 100644 --- a/src/args/agnostic.nix +++ b/src/args/agnostic.nix @@ -42,6 +42,7 @@ formatBash = import ./format-bash/default.nix self; formatNix = import ./format-nix/default.nix self; formatTerraform = import ./format-terraform/default.nix self; + formatYaml = import ./format-yaml/default.nix self; fromJson = builtins.fromJSON; fromJsonFile = path: builtins.fromJSON (builtins.readFile path); fromToml = builtins.fromTOML; diff --git a/src/args/calculate-cvss-3/dependencies.yaml b/src/args/calculate-cvss-3/dependencies.yaml index bcae641d..a9e9b74d 100644 --- a/src/args/calculate-cvss-3/dependencies.yaml +++ b/src/args/calculate-cvss-3/dependencies.yaml @@ -1 +1,2 @@ +--- cvss: '2.3' diff --git a/src/args/calculate-cvss-3/sources.yaml b/src/args/calculate-cvss-3/sources.yaml index 1e6ffdc6..01fc9920 100644 --- a/src/args/calculate-cvss-3/sources.yaml +++ b/src/args/calculate-cvss-3/sources.yaml @@ -1,5 +1,6 @@ +--- closure: - cvss: "2.3" + cvss: '2.3' links: - name: cvss-2.3-py2.py3-none-any.whl sha256: 0dm3hvlj6ax3vji6ixb3fyhnvzhajxzdfj2syyxapxa0w5w6nsqb @@ -7,4 +8,4 @@ links: - name: cvss-2.3.tar.gz sha256: 0h21l80ia9zhhrk98b9y86ihigp7jnf2g8dydi3y14vv5vdcj8pw url: https://files.pythonhosted.org/packages/9b/f8/e0d929b2a37dd32cdf9f7aba88609a99a4f82b0fd961214466fbda8ee756/cvss-2.3.tar.gz -python: "3.8" +python: '3.8' diff --git a/src/args/format-yaml/default.nix b/src/args/format-yaml/default.nix new file mode 100644 index 00000000..60f16ed5 --- /dev/null +++ b/src/args/format-yaml/default.nix @@ -0,0 +1,30 @@ +{ + __nixpkgs__, + makePythonPypiEnvironment, + makeScript, + toBashArray, + ... +}: { + name, + targets, + ... +}: +makeScript { + name = "format-yaml-for-${name}"; + replace = { + __argTargets__ = toBashArray targets; + }; + searchPaths = { + bin = [ + __nixpkgs__.findutils + __nixpkgs__.git + ]; + source = [ + (makePythonPypiEnvironment { + name = "yamlfix"; + sourcesYaml = ./sources.yaml; + }) + ]; + }; + entrypoint = ./entrypoint.sh; +} diff --git a/src/args/format-yaml/dependencies.yaml b/src/args/format-yaml/dependencies.yaml new file mode 100644 index 00000000..a3ca6401 --- /dev/null +++ b/src/args/format-yaml/dependencies.yaml @@ -0,0 +1,2 @@ +--- +yamlfix: 0.10.0 diff --git a/src/args/format-yaml/entrypoint.sh b/src/args/format-yaml/entrypoint.sh new file mode 100644 index 00000000..7097e45d --- /dev/null +++ b/src/args/format-yaml/entrypoint.sh @@ -0,0 +1,33 @@ +# shellcheck shell=bash + +function diff { + git --no-pager diff -G. --no-index "${1}" "${2}" > /dev/null +} + +function main { + source __argTargets__/template local targets + local tmp_paths + local tmp_file + local exit_code="0" + + info "Formatting YAML files" \ + && tmp_paths=$(mktemp) \ + && for target in "${targets[@]}"; do + find "${target}" -wholename '*.yml' -or -wholename '*.yaml' -type f \ + | sort --ignore-case > "${tmp_paths}" \ + && while read -r path; do + tmp_file=$(mktemp) \ + && copy "${path}" "${tmp_file}" \ + && yamlfix "${path}" 2> /dev/null \ + && if ! diff "${tmp_file}" "${path}"; then + info "This file does not comply the format. We just formatted it: ${path} " \ + && exit_code="1" + fi \ + || return 1 + done < "${tmp_paths}" \ + || return 1 + done \ + && return "${exit_code}" +} + +main "${@}" diff --git a/src/args/format-yaml/sources.yaml b/src/args/format-yaml/sources.yaml new file mode 100644 index 00000000..27998f73 --- /dev/null +++ b/src/args/format-yaml/sources.yaml @@ -0,0 +1,39 @@ +--- +closure: + click: 8.1.3 + colorama: 0.4.5 + distro: 1.7.0 + ruyaml: 0.91.0 + yamlfix: 0.10.0 +links: + - name: click-8.1.3-py3-none-any.whl + sha256: 0j6vn6ayxq1bqs1v64r90sarg05hj6rxj4w29vs0k9hmrcrq2kdv + url: https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl + - name: click-8.1.3.tar.gz + sha256: 13kvp8visj5xh9d43brnda6q0kc1s40flxa5cw0p0a9hzf5dr0kn + url: https://files.pythonhosted.org/packages/59/87/84326af34517fca8c58418d148f2403df25303e02736832403587318e9e8/click-8.1.3.tar.gz + - name: colorama-0.4.5-py2.py3-none-any.whl + sha256: 1nlriqsqjsilvxg6pm3086z2xkjviplw3gz79a1gadryjd2g8jw5 + url: https://files.pythonhosted.org/packages/77/8b/7550e87b2d308a1b711725dfaddc19c695f8c5fa413c640b2be01662f4e6/colorama-0.4.5-py2.py3-none-any.whl + - name: colorama-0.4.5.tar.gz + sha256: 195pcxlhp4qz8pq496kvw6k7vdd056j8mffr76k8h2f59wrv9ip6 + url: https://files.pythonhosted.org/packages/2b/65/24d033a9325ce42ccbfa3ca2d0866c7e89cc68e5b9d92ecaba9feef631df/colorama-0.4.5.tar.gz + - name: distro-1.7.0-py3-none-any.whl + sha256: 0sx0lf5vvfmnry3kxa6m77awa81q7vw0fy63c0hjqsbyf0fk35nm + url: https://files.pythonhosted.org/packages/e1/54/d08d1ad53788515392bec14d2d6e8c410bffdc127780a9a4aa8e6854d502/distro-1.7.0-py3-none-any.whl + - name: distro-1.7.0.tar.gz + sha256: 0f8w5j2vxaq2i8vjg2c9b26rz4vs8zp40bmm68ll05n2c37yq6hm + url: https://files.pythonhosted.org/packages/b5/7e/ddfbd640ac9a82e60718558a3de7d5988a7d4648385cf00318f60a8b073a/distro-1.7.0.tar.gz + - name: ruyaml-0.91.0-py3-none-any.whl + sha256: 0m8p2wr7a1hamp6h1ps6a8ky06nlzw72wiq9w90d6yn7i4ryxq2h + url: https://files.pythonhosted.org/packages/1e/9a/16ca152a04b231c179c626de40af1d5d0bc2bc57bc875c397706016ddb2b/ruyaml-0.91.0-py3-none-any.whl + - name: ruyaml-0.91.0.tar.gz + sha256: 1avip2d9c9x1y6hx3yfzm7ssip5ws5j4c9ny7dnnjb889ngxxsbc + url: https://files.pythonhosted.org/packages/4b/75/abbc7eab08bad7f47887a0555d3ac9e3947f89d2416678c08e025e449fdc/ruyaml-0.91.0.tar.gz + - name: yamlfix-0.10.0-py3-none-any.whl + sha256: 0ffdlclic8q2bcvlxrnd6la5f3dzr0qd3kfw86mn0wmkd0vykcq9 + url: https://files.pythonhosted.org/packages/16/6d/f34d15fc4541356aea477fa5ec467a1937009308447a83e078b022ce2d51/yamlfix-0.10.0-py3-none-any.whl + - name: yamlfix-0.10.0.tar.gz + sha256: 12i72f8g6zpbklzy5awx1g8vpq7lm3yj9z88hldxasrs71c7kzsn + url: https://files.pythonhosted.org/packages/99/47/cb2d70d4d0b8612748f6a8957b63cb34410208bf3742f768d2c6c120c1af/yamlfix-0.10.0.tar.gz +python: '3.9' diff --git a/src/args/lint-python-imports/pypi-deps.yaml b/src/args/lint-python-imports/pypi-deps.yaml index a8088a20..bdbb144f 100644 --- a/src/args/lint-python-imports/pypi-deps.yaml +++ b/src/args/lint-python-imports/pypi-deps.yaml @@ -1 +1,2 @@ -import-linter: "1.2.4" +--- +import-linter: 1.2.4 diff --git a/src/args/lint-python-imports/pypi-sources.yaml b/src/args/lint-python-imports/pypi-sources.yaml index fa0e5cbd..a609cd03 100644 --- a/src/args/lint-python-imports/pypi-sources.yaml +++ b/src/args/lint-python-imports/pypi-sources.yaml @@ -1,3 +1,4 @@ +--- closure: click: 8.0.1 colorama: 0.4.4 @@ -29,4 +30,4 @@ links: - name: networkx-2.6.2.tar.gz sha256: 1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3 url: https://files.pythonhosted.org/packages/4b/3b/4378599026b81d1987a6e0d6d3d677e8f26308a039491a6b8a1914e58a4c/networkx-2.6.2.tar.gz -python: "3.9" +python: '3.9' diff --git a/src/args/lint-python/pypi-deps.yaml b/src/args/lint-python/pypi-deps.yaml index da9aa507..29a3cc31 100644 --- a/src/args/lint-python/pypi-deps.yaml +++ b/src/args/lint-python/pypi-deps.yaml @@ -1,2 +1,3 @@ +--- mypy: '0.910' prospector: 1.5.1 diff --git a/src/args/lint-python/pypi-sources-3.7.yaml b/src/args/lint-python/pypi-sources-3.7.yaml index 465b5bf5..59673e2e 100644 --- a/src/args/lint-python/pypi-sources-3.7.yaml +++ b/src/args/lint-python/pypi-sources-3.7.yaml @@ -1,3 +1,4 @@ +--- closure: astroid: 2.8.0 colorama: 0.4.4 @@ -8,7 +9,7 @@ closure: isort: 5.9.3 lazy-object-proxy: 1.6.0 mccabe: 0.6.1 - mypy: "0.910" + mypy: '0.910' mypy-extensions: 0.4.3 pep8-naming: 0.10.0 platformdirs: 2.4.0 @@ -17,12 +18,12 @@ closure: pydocstyle: 6.1.1 pyflakes: 2.3.1 pylint: 2.11.1 - pylint-celery: "0.3" + pylint-celery: '0.3' pylint-django: 2.4.4 - pylint-flask: "0.6" - pylint-plugin-utils: "0.6" + pylint-flask: '0.6' + pylint-plugin-utils: '0.6' pyyaml: 5.4.1 - requirements-detector: "0.7" + requirements-detector: '0.7' setoptconf-tmp: 0.3.1 snowballstemmer: 2.1.0 toml: 0.10.2 @@ -235,4 +236,4 @@ links: - name: zipp-3.6.0.tar.gz sha256: 0ckqknmfy8wdgdsddqx2rqgmcj844xkaj2kgcc3nwjlz6v2l9iki url: https://files.pythonhosted.org/packages/02/bf/0d03dbdedb83afec081fefe86cae3a2447250ef1a81ac601a9a56e785401/zipp-3.6.0.tar.gz -python: "3.7" +python: '3.7' diff --git a/src/args/lint-python/pypi-sources-3.8.yaml b/src/args/lint-python/pypi-sources-3.8.yaml index 8a8f9388..a7c9eb46 100644 --- a/src/args/lint-python/pypi-sources-3.8.yaml +++ b/src/args/lint-python/pypi-sources-3.8.yaml @@ -1,3 +1,4 @@ +--- closure: astroid: 2.8.0 colorama: 0.4.4 @@ -7,7 +8,7 @@ closure: isort: 5.9.3 lazy-object-proxy: 1.6.0 mccabe: 0.6.1 - mypy: "0.910" + mypy: '0.910' mypy-extensions: 0.4.3 pep8-naming: 0.10.0 platformdirs: 2.4.0 @@ -16,12 +17,12 @@ closure: pydocstyle: 6.1.1 pyflakes: 2.3.1 pylint: 2.11.1 - pylint-celery: "0.3" + pylint-celery: '0.3' pylint-django: 2.4.4 - pylint-flask: "0.6" - pylint-plugin-utils: "0.6" + pylint-flask: '0.6' + pylint-plugin-utils: '0.6' pyyaml: 5.4.1 - requirements-detector: "0.7" + requirements-detector: '0.7' setoptconf-tmp: 0.3.1 snowballstemmer: 2.1.0 toml: 0.10.2 @@ -205,4 +206,4 @@ links: - name: wrapt-1.12.1.tar.gz sha256: 1mwpkdnqxf0yxj1a0hsnl06lf287qi5ap7309wm37x45zf0zlbxn url: https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz -python: "3.8" +python: '3.8' diff --git a/src/args/lint-python/pypi-sources-3.9.yaml b/src/args/lint-python/pypi-sources-3.9.yaml index 2b8b7024..8ea323d4 100644 --- a/src/args/lint-python/pypi-sources-3.9.yaml +++ b/src/args/lint-python/pypi-sources-3.9.yaml @@ -1,3 +1,4 @@ +--- closure: astroid: 2.8.0 colorama: 0.4.4 @@ -7,7 +8,7 @@ closure: isort: 5.9.3 lazy-object-proxy: 1.6.0 mccabe: 0.6.1 - mypy: "0.910" + mypy: '0.910' mypy-extensions: 0.4.3 pep8-naming: 0.10.0 platformdirs: 2.4.0 @@ -16,12 +17,12 @@ closure: pydocstyle: 6.1.1 pyflakes: 2.3.1 pylint: 2.11.1 - pylint-celery: "0.3" + pylint-celery: '0.3' pylint-django: 2.4.4 - pylint-flask: "0.6" - pylint-plugin-utils: "0.6" + pylint-flask: '0.6' + pylint-plugin-utils: '0.6' pyyaml: 5.4.1 - requirements-detector: "0.7" + requirements-detector: '0.7' setoptconf-tmp: 0.3.1 snowballstemmer: 2.1.0 toml: 0.10.2 @@ -211,4 +212,4 @@ links: - name: wrapt-1.12.1.tar.gz sha256: 1mwpkdnqxf0yxj1a0hsnl06lf287qi5ap7309wm37x45zf0zlbxn url: https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz -python: "3.9" +python: '3.9' diff --git a/src/args/lint-with-lizard/dependencies.yaml b/src/args/lint-with-lizard/dependencies.yaml index 3a1857ec..112c7c48 100644 --- a/src/args/lint-with-lizard/dependencies.yaml +++ b/src/args/lint-with-lizard/dependencies.yaml @@ -1 +1,2 @@ +--- lizard: 1.17.3 diff --git a/src/args/lint-with-lizard/sources.yaml b/src/args/lint-with-lizard/sources.yaml index 798ca485..896e31a6 100644 --- a/src/args/lint-with-lizard/sources.yaml +++ b/src/args/lint-with-lizard/sources.yaml @@ -1,3 +1,4 @@ +--- closure: lizard: 1.17.3 links: @@ -7,4 +8,4 @@ links: - name: lizard-1.17.3.tar.gz sha256: 1578q2vgnlm9bxwmbap3ffkhb551ml13yq5ffc4yhya9q3zlx691 url: https://files.pythonhosted.org/packages/e5/f0/95d5032d687418436a29c7e7a19ecba1256faab21add64df8dd4144256b0/lizard-1.17.3.tar.gz -python: "3.8" +python: '3.8' diff --git a/src/args/make-python-pypi-environment/sources/numpy-1.21.2/dependencies.yaml b/src/args/make-python-pypi-environment/sources/numpy-1.21.2/dependencies.yaml index eca5cdb0..b629986d 100644 --- a/src/args/make-python-pypi-environment/sources/numpy-1.21.2/dependencies.yaml +++ b/src/args/make-python-pypi-environment/sources/numpy-1.21.2/dependencies.yaml @@ -1 +1,2 @@ +--- numpy: 1.21.2 diff --git a/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-37.yaml b/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-37.yaml index 4ef507dd..764867ae 100644 --- a/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-37.yaml +++ b/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-37.yaml @@ -1,3 +1,4 @@ +--- closure: numpy: 1.21.2 links: @@ -22,4 +23,4 @@ links: - name: numpy-1.21.2.zip sha256: 1p6n7pbc4s7qdqh28clyrhahs0xzadh7q0w6vwakp4n5mzc1ccj2 url: https://files.pythonhosted.org/packages/3a/be/650f9c091ef71cb01d735775d554e068752d3ff63d7943b26316dc401749/numpy-1.21.2.zip -python: "3.7" +python: '3.7' diff --git a/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-38.yaml b/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-38.yaml index b921702f..f1772e82 100644 --- a/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-38.yaml +++ b/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-38.yaml @@ -1,3 +1,4 @@ +--- closure: numpy: 1.21.2 links: @@ -28,4 +29,4 @@ links: - name: numpy-1.21.2.zip sha256: 1p6n7pbc4s7qdqh28clyrhahs0xzadh7q0w6vwakp4n5mzc1ccj2 url: https://files.pythonhosted.org/packages/3a/be/650f9c091ef71cb01d735775d554e068752d3ff63d7943b26316dc401749/numpy-1.21.2.zip -python: "3.8" +python: '3.8' diff --git a/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-39.yaml b/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-39.yaml index 61e9a390..337f2ac9 100644 --- a/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-39.yaml +++ b/src/args/make-python-pypi-environment/sources/numpy-1.21.2/sources-39.yaml @@ -1,3 +1,4 @@ +--- closure: numpy: 1.21.2 links: @@ -22,4 +23,4 @@ links: - name: numpy-1.21.2.zip sha256: 1p6n7pbc4s7qdqh28clyrhahs0xzadh7q0w6vwakp4n5mzc1ccj2 url: https://files.pythonhosted.org/packages/3a/be/650f9c091ef71cb01d735775d554e068752d3ff63d7943b26316dc401749/numpy-1.21.2.zip -python: "3.9" +python: '3.9' diff --git a/src/args/test-python/pypi-deps.yaml b/src/args/test-python/pypi-deps.yaml index 5ff0c84d..58c03cd4 100644 --- a/src/args/test-python/pypi-deps.yaml +++ b/src/args/test-python/pypi-deps.yaml @@ -1 +1,2 @@ -pytest: "*" +--- +pytest: '*' diff --git a/src/args/test-python/pypi-sources-3.7.yaml b/src/args/test-python/pypi-sources-3.7.yaml index cccbda02..48fb103d 100644 --- a/src/args/test-python/pypi-sources-3.7.yaml +++ b/src/args/test-python/pypi-sources-3.7.yaml @@ -1,10 +1,11 @@ +--- closure: atomicwrites: 1.4.0 attrs: 21.2.0 colorama: 0.4.4 importlib-metadata: 4.8.1 iniconfig: 1.1.1 - packaging: "21.0" + packaging: '21.0' pluggy: 1.0.0 py: 1.10.0 pyparsing: 2.4.7 @@ -91,4 +92,4 @@ links: - name: zipp-3.5.0.tar.gz sha256: 1i7hkdbivya5lvww9y8i85mp3spbwzsfk9a96kvcyj3y00g2p0gm url: https://files.pythonhosted.org/packages/3a/9f/1d4b62cbe8d222539a84089eeab603d8e45ee1f897803a0ae0860400d6e7/zipp-3.5.0.tar.gz -python: "3.7" +python: '3.7' diff --git a/src/args/test-python/pypi-sources-3.8.yaml b/src/args/test-python/pypi-sources-3.8.yaml index eedfec56..374d7a95 100644 --- a/src/args/test-python/pypi-sources-3.8.yaml +++ b/src/args/test-python/pypi-sources-3.8.yaml @@ -1,9 +1,10 @@ +--- closure: atomicwrites: 1.4.0 attrs: 21.2.0 colorama: 0.4.4 iniconfig: 1.1.1 - packaging: "21.0" + packaging: '21.0' pluggy: 1.0.0 py: 1.10.0 pyparsing: 2.4.7 @@ -70,4 +71,4 @@ links: - name: toml-0.10.2.tar.gz sha256: 13z6rff86bzdpl094x0vmfvls779931xj90dlbs9kpfm138s3gdk url: https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz -python: "3.8" +python: '3.8' diff --git a/src/args/test-python/pypi-sources-3.9.yaml b/src/args/test-python/pypi-sources-3.9.yaml index 3ada024f..d3a05356 100644 --- a/src/args/test-python/pypi-sources-3.9.yaml +++ b/src/args/test-python/pypi-sources-3.9.yaml @@ -1,9 +1,10 @@ +--- closure: atomicwrites: 1.4.0 attrs: 21.2.0 colorama: 0.4.4 iniconfig: 1.1.1 - packaging: "21.0" + packaging: '21.0' pluggy: 1.0.0 py: 1.10.0 pyparsing: 2.4.7 @@ -70,4 +71,4 @@ links: - name: toml-0.10.2.tar.gz sha256: 13z6rff86bzdpl094x0vmfvls779931xj90dlbs9kpfm138s3gdk url: https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz -python: "3.9" +python: '3.9' diff --git a/src/evaluator/modules/default.nix b/src/evaluator/modules/default.nix index b7fdf08c..c523b812 100644 --- a/src/evaluator/modules/default.nix +++ b/src/evaluator/modules/default.nix @@ -26,6 +26,7 @@ (import ./format-scala/default.nix args) (import ./format-javascript/default.nix args) (import ./format-terraform/default.nix args) + (import ./format-yaml/default.nix args) (import ./hello-world/default.nix args) (import ./inputs/default.nix) (import ./lint-bash/default.nix args) diff --git a/src/evaluator/modules/format-javascript/settings-prettierrc.yaml b/src/evaluator/modules/format-javascript/settings-prettierrc.yaml index 62b36f0a..6a389bd9 100644 --- a/src/evaluator/modules/format-javascript/settings-prettierrc.yaml +++ b/src/evaluator/modules/format-javascript/settings-prettierrc.yaml @@ -1,6 +1,7 @@ +--- useTabs: false semi: true -trailingComma: "es5" +trailingComma: es5 singleQuote: false tabWidth: 2 bracketSpacing: true diff --git a/src/evaluator/modules/format-yaml/default.nix b/src/evaluator/modules/format-yaml/default.nix new file mode 100644 index 00000000..d52d74d9 --- /dev/null +++ b/src/evaluator/modules/format-yaml/default.nix @@ -0,0 +1,26 @@ +{formatYaml, ...}: { + config, + lib, + ... +}: { + options = { + formatYaml = { + enable = lib.mkOption { + default = false; + type = lib.types.bool; + }; + targets = lib.mkOption { + default = ["/"]; + type = lib.types.listOf lib.types.str; + }; + }; + }; + config = { + outputs = { + "/formatYaml" = lib.mkIf config.formatYaml.enable (formatYaml { + name = "builtin"; + targets = builtins.map (rel: "." + rel) config.formatYaml.targets; + }); + }; + }; +} diff --git a/src/evaluator/modules/lint-python/settings-prospector.yaml b/src/evaluator/modules/lint-python/settings-prospector.yaml index a0b8a48f..353ce27e 100644 --- a/src/evaluator/modules/lint-python/settings-prospector.yaml +++ b/src/evaluator/modules/lint-python/settings-prospector.yaml @@ -1,3 +1,4 @@ +--- inherits: - full_pep8 - strictness_veryhigh diff --git a/test/lint-with-ajv/data.yaml b/test/lint-with-ajv/data.yaml index e0ee5493..89a6badf 100644 --- a/test/lint-with-ajv/data.yaml +++ b/test/lint-with-ajv/data.yaml @@ -1,2 +1,3 @@ +--- name: John Doe color: Blue