From 23c7d5b315bbaa746c3cc016680d49bc577e906e Mon Sep 17 00:00:00 2001 From: dgibbs64 Date: Tue, 19 Aug 2025 14:12:19 +0000 Subject: [PATCH] chore: synced local './' with remote 'bash/' --- .devcontainer/devcontainer.json | 30 ++++++++++++++ .editorconfig | 17 ++------ .github/workflows/action-prettier.yml | 32 +++++++++++++++ .github/workflows/action-super-linter.yml | 49 +++++++++++++++++++++++ .gitignore | 14 ++++++- .prettierrc.json | 3 ++ .vscode/extensions.json | 8 ++-- 7 files changed, 134 insertions(+), 19 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/action-prettier.yml create mode 100644 .github/workflows/action-super-linter.yml create mode 100644 .prettierrc.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..506b50754 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,30 @@ +{ + "name": "BASH Dev Container", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/devcontainers-community/npm-features/prettier:1": { + "plugins": "prettier-plugin-sh" + }, + "ghcr.io/devcontainers-extra/features/actionlint:1": {}, + "ghcr.io/devcontainers-extra/features/checkov:1": {}, + "ghcr.io/devcontainers-extra/features/markdownlint-cli:1": {}, + "ghcr.io/devcontainers-extra/features/shellcheck:1": {}, + "ghcr.io/devcontainers-extra/features/yamllint:2": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "github.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "redhat.vscode-yaml", + "timonwong.shellcheck", + "yzhang.markdown-all-in-one" + ] + } + }, + "postCreateCommand": "npm init -y >/dev/null 2>&1 || true && npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template" +} diff --git a/.editorconfig b/.editorconfig index f20e02e1c..da6e5f2ca 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,28 +1,17 @@ # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. -# Atom: Please assure your Atom's config setting Tab Type is set to auto, otherwise Atom-EditorConfig may not work as expected. Also disable whitespace package. # http://editorconfig.org/ root = true [*] charset = utf-8 -indent_style = tab -indent_size = 4 -trim_trailing_whitespace = true end_of_line = lf -insert_final_newline = true - -# YAML Files -[*.{yml,yaml}] -indent_size = 2 -indent_style = space - -# JSON Files -[*.{json,json5,webmanifest}] indent_size = 2 indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true # BASH Files [*.{.sh}] -indent_style = tab indent_size = 4 +indent_style = tab diff --git a/.github/workflows/action-prettier.yml b/.github/workflows/action-prettier.yml new file mode 100644 index 000000000..45ee27b8c --- /dev/null +++ b/.github/workflows/action-prettier.yml @@ -0,0 +1,32 @@ +name: Prettier +on: + push: + branches: + - "*" + +concurrency: + group: prettier-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: write + +jobs: + prettier: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Install Prettier and plugins + run: | + npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template + + - name: Prettify code + uses: creyD/prettier_action@v4.6 + with: + prettier_plugins: "prettier-plugin-sh prettier-plugin-jinja-template" + prettier_options: --write . + github_token: ${{ secrets.GITHUB_TOKEN }} + commit_message: "chore(prettier): format code" diff --git a/.github/workflows/action-super-linter.yml b/.github/workflows/action-super-linter.yml new file mode 100644 index 000000000..c85f22b73 --- /dev/null +++ b/.github/workflows/action-super-linter.yml @@ -0,0 +1,49 @@ +--- +name: Super Linter + +on: + workflow_dispatch: + push: + branches: + - "*" + +concurrency: + group: super-linter-${{ github.ref }} + cancel-in-progress: true + +permissions: {} + +jobs: + build: + name: Lint + runs-on: ubuntu-latest + + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + # super-linter needs the full git history to get the + # list of files that changed across commits + fetch-depth: 0 + + - name: Install Prettier plugins (for summary formatting) + run: | + npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template || true + + - name: Super-linter + uses: super-linter/super-linter@v8 + env: + # To report GitHub Actions status checks + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_JSCPD: false + VALIDATE_SHELL_SHFMT: false + VALIDATE_YAML_PRETTIER: false + VALIDATE_JSON_PRETTIER: false + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_NATURAL_LANGUAGE: false diff --git a/.gitignore b/.gitignore index e5c465ce2..8bffd3faa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,12 @@ -.vscode/settings.json -/node_modules +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets +.history/ +*.vsix + +# Node.js +node_modules diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 000000000..02d542d50 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "plugins": ["prettier-plugin-sh"] +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c7a7dab10..d31b65dd2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,10 +1,12 @@ { "recommendations": [ - "ms-python.python", + "DavidAnson.vscode-markdownlint", "editorconfig.editorconfig", - "yzhang.markdown-all-in-one", "esbenp.prettier-vscode", + "github.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "redhat.vscode-yaml", "timonwong.shellcheck", - "redhat.vscode-yaml" + "yzhang.markdown-all-in-one" ] }