From fece5d5a0b40b18847eb502ec349d1843ff764f8 Mon Sep 17 00:00:00 2001 From: Attila Zsolt Somogyi Date: Sun, 26 Mar 2023 21:48:44 +0200 Subject: [PATCH] test: fix missing conf file at markdownlint --- .markdownlint.json | 8 ++++++++ .markdownlintignore | 1 + tests/static/test_helper/static.bash | 21 +++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 .markdownlint.json create mode 100644 .markdownlintignore create mode 100644 tests/static/test_helper/static.bash diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..faec8c7 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,8 @@ +{ + "default": true, + "line-length": false, + "MD001": false, + "MD024": false, + "MD033": { "allowed_elements": ["a", "p", "img"] }, + "MD041": false +} diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1 @@ +node_modules diff --git a/tests/static/test_helper/static.bash b/tests/static/test_helper/static.bash new file mode 100644 index 0000000..f2b97aa --- /dev/null +++ b/tests/static/test_helper/static.bash @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +function print_errors() { + for line in "${lines[@]}"; do + echo "$line" + done +} + +function shellcheck_test() { + shellcheck_url="https://github.com/koalaman/shellcheck" + + which shellcheck > /dev/null || { + echo "shellcheck not found, please install: $shellcheck_url" + exit 1 + } + + scripts=$(find . -name '*.sh' -name '*.bash') + for script in $scripts; do + shellcheck "$script" + done +}