From 5e2c028e0fd90209bcd27683e65193ab0ad71c45 Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Tue, 30 Jan 2024 12:09:46 +0100 Subject: [PATCH] ci: update devcontainer definition (#5132) - Remove unneeded 'context' directive - Update the list of extensions to install - Configure tasks to run super-linter - Remove redundant README - Remove outdated launch configurations and scripts --- .devcontainer/README.md | 5 ---- .devcontainer/devcontainer.env | 5 ++++ .devcontainer/devcontainer.json | 41 +++++++++++++++++++++++++++++---- .github/dependabot.yml | 23 +++++------------- .vscode/launch.json | 16 ------------- .vscode/tasks.json | 10 ++++++++ .vscode/testlinter.sh | 26 --------------------- 7 files changed, 57 insertions(+), 69 deletions(-) delete mode 100644 .devcontainer/README.md create mode 100644 .devcontainer/devcontainer.env delete mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json delete mode 100755 .vscode/testlinter.sh diff --git a/.devcontainer/README.md b/.devcontainer/README.md deleted file mode 100644 index e8ddd273..00000000 --- a/.devcontainer/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Visual Studio Code dev container configuration - -This file specifies to Visual Studio Code how to run a [dev container](https://code.visualstudio.com/docs/remote/containers). - -For format details, see [documentation](https://code.visualstudio.com/docs/remote/devcontainerjson-reference). diff --git a/.devcontainer/devcontainer.env b/.devcontainer/devcontainer.env new file mode 100644 index 00000000..0be22df4 --- /dev/null +++ b/.devcontainer/devcontainer.env @@ -0,0 +1,5 @@ +ACTIONS_RUNNER_DEBUG=true +DEFAULT_BRANCH=main +DEFAULT_WORKSPACE=/workspaces/super-linter +ENABLE_GITHUB_ACTIONS_GROUP_TITLE=true +RUN_LOCAL=true diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 34288732..0e07b828 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,41 @@ { "name": "Super-Linter", - "context": "..", "image": "ghcr.io/super-linter/super-linter:latest", - "extensions": [ - "github.vscode-pull-request-github", - "rogalmic.bash-debug", - "EditorConfig.EditorConfig" + "customizations": { + "vscode": { + "settings": {}, + "extensions": [ + "DavidAnson.vscode-markdownlint", + "EditorConfig.EditorConfig", + "GitHub.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "mads-hartmann.bash-ide-vscode", + "mkhl.shfmt", + "ms-azuretools.vscode-docker", + "ms-vscode.makefile-tools", + "timonwong.shellcheck" + ] + } + }, + "mounts": [ + { + "source": "${localWorkspaceFolder}/TEMPLATES", + "target": "/action/lib/.automation", + "type": "bind" + }, + { + "source": "${localWorkspaceFolder}/lib/linter.sh", + "target": "/action/lib/linter.sh", + "type": "bind" + }, + { + "source": "${localWorkspaceFolder}/lib/functions", + "target": "/action/lib/functions", + "type": "bind" + } + ], + "runArgs": [ + "--env-file", + ".devcontainer/devcontainer.env" ] } diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 570912e2..b866f63a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,58 +4,53 @@ ################################# version: 2 updates: + + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly + - package-ecosystem: github-actions commit-message: prefix: "deps(github-actions)" directory: "/" schedule: interval: "weekly" - open-pull-requests-limit: 10 - # Maintain dependencies for js with npm - package-ecosystem: "npm" commit-message: prefix: "deps(npm)" directory: "/dependencies" schedule: interval: "weekly" - open-pull-requests-limit: 10 - # Maintain dependencies for ruby with bundler - package-ecosystem: "bundler" commit-message: prefix: "deps(bundler)" directory: "/dependencies" schedule: interval: "weekly" - open-pull-requests-limit: 10 - # Maintain dependencies for docker - package-ecosystem: "docker" commit-message: prefix: "deps(docker)" directory: "/" schedule: interval: "weekly" - open-pull-requests-limit: 10 - # Maintain dependencies for python with pip - package-ecosystem: "pip" commit-message: prefix: "deps(python)" directory: "/dependencies/python/" schedule: interval: "weekly" - open-pull-requests-limit: 10 - # Maintain dependencies for Java - package-ecosystem: "gradle" commit-message: prefix: "deps(java)" directory: "/dependencies/checkstyle" schedule: interval: "weekly" - open-pull-requests-limit: 10 - package-ecosystem: "gradle" commit-message: @@ -63,7 +58,6 @@ updates: directory: "/dependencies/google-java-format" schedule: interval: "weekly" - open-pull-requests-limit: 10 - package-ecosystem: "gradle" commit-message: @@ -71,22 +65,17 @@ updates: directory: "/dependencies/ktlint" schedule: interval: "weekly" - open-pull-requests-limit: 10 - # Maintain dev dependencies for docker - package-ecosystem: "docker" commit-message: prefix: "deps(dev-docker)" directory: "/dev-dependencies" schedule: interval: "weekly" - open-pull-requests-limit: 10 - # Maintain dev dependencies for js with npm - package-ecosystem: "npm" commit-message: prefix: "deps(dev-npm)" directory: "/dev-dependencies" schedule: interval: "weekly" - open-pull-requests-limit: 10 diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 4e554e66..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "type": "bashdb", - "request": "launch", - "name": "Test Linter", - "program": ".vscode/testlinter.sh", - "cwd": "${workspaceFolder}", - "internalConsoleOptions": "openOnSessionStart", - "presentation": { - "group": "aLinter" - } - } - ] -} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..20f5f3cb --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,10 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run super-linter", + "type": "shell", + "command": "/action/lib/linter.sh" + } + ] +} diff --git a/.vscode/testlinter.sh b/.vscode/testlinter.sh deleted file mode 100755 index fe9612d9..00000000 --- a/.vscode/testlinter.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -# At this point you can use the debug console to add export GITHUB_WORKSPACE=/path to test only a specific folder -# You can also use ln -s /path /tmp/lint as an alternative -# If you do neither, this will default to running against the test automation files - -########### -# GLOBALS # -########### -CODE_PATH='/tmp/lint' # Path to code base - -################## -# Check the path # -################## -if [ ! -L ${CODE_PATH} ]; then - # Create symbolic link - ln -s "${PWD}"/test/linters ${CODE_PATH} -fi - -######################### -# Export to run locally # -######################### -export RUN_LOCAL=true - -# shellcheck source=/dev/null -source "${PWD}"/lib/linter.sh