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
This commit is contained in:
Marco Ferrari 2024-01-30 12:09:46 +01:00 committed by GitHub
parent 72d8ac29c4
commit 5e2c028e0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 57 additions and 69 deletions

View file

@ -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).

View file

@ -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

View file

@ -1,10 +1,41 @@
{
"name": "Super-Linter",
"context": "..",
"image": "ghcr.io/super-linter/super-linter:latest",
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"github.vscode-pull-request-github",
"rogalmic.bash-debug",
"EditorConfig.EditorConfig"
"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"
]
}

View file

@ -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

16
.vscode/launch.json vendored
View file

@ -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"
}
}
]
}

10
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,10 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run super-linter",
"type": "shell",
"command": "/action/lib/linter.sh"
}
]
}

26
.vscode/testlinter.sh vendored
View file

@ -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