From 78b0cfeb485d27d50fcb36289ea2f5735b045616 Mon Sep 17 00:00:00 2001 From: Marcus Ramberg Date: Mon, 14 Oct 2024 13:54:24 +0200 Subject: [PATCH] chore: setup more relaxed linter rules --- .markdownlint.json | 12 ++++++ .yamllint.yaml | 12 ++++++ devenv.nix | 8 +++- docs/devenv.schema.json | 96 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 .markdownlint.json create mode 100644 .yamllint.yaml create mode 100644 docs/devenv.schema.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..2168639 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,12 @@ +{ + "MD004": { + "style": "dash" + }, + "MD012": false, + "MD013": false, + "MD036": false, + "MD046": false, + "MD024": { + "siblings_only": true + } +} diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..3211dce --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,12 @@ +extends: default + +# Ignore helm templates and .terraform provider paths +ignore: | + .terraform/ + tmp/ + +rules: + line-length: disable + document-start: disable + comments: disable + truthy: disable # github workflows uses "on:" a lot, which is a truthy value in yaml diff --git a/devenv.nix b/devenv.nix index cd5a684..91af372 100644 --- a/devenv.nix +++ b/devenv.nix @@ -8,7 +8,9 @@ hooks = { gofmt.enable = true; shellcheck.enable = true; - markdownlint.enable = true; + markdownlint = { + enable = true; + }; yamllint.enable = true; commitizen.enable = true; }; @@ -16,4 +18,8 @@ # https://devenv.sh/packages/ packages = [ pkgs.go-task ]; languages.go.enable = true; + enterTest = '' + echo "Entering test environment" + task test + ''; } diff --git a/docs/devenv.schema.json b/docs/devenv.schema.json new file mode 100644 index 0000000..f0a0c46 --- /dev/null +++ b/docs/devenv.schema.json @@ -0,0 +1,96 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Config", + "type": "object", + "properties": { + "allowBroken": { + "type": "boolean" + }, + "allowUnfree": { + "type": "boolean" + }, + "clean": { + "anyOf": [ + { + "$ref": "#/definitions/Clean" + }, + { + "type": "null" + } + ] + }, + "imports": { + "type": "array", + "items": { + "type": "string" + } + }, + "impure": { + "type": "boolean" + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Input" + } + }, + "permittedInsecurePackages": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "definitions": { + "Clean": { + "type": "object", + "required": [ + "enabled", + "keep" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "keep": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Input": { + "type": "object", + "properties": { + "flake": { + "type": "boolean" + }, + "follows": { + "type": [ + "string", + "null" + ] + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Input" + } + }, + "overlays": { + "type": "array", + "items": { + "type": "string" + } + }, + "url": { + "type": [ + "string", + "null" + ] + } + } + } + } +} \ No newline at end of file