Skip to content

Commit 01f8987

Browse files
dependabot[bot]neilime
authored andcommitted
chore: bump super-linter/super-linter
Bumps the docker-dependencies group with 1 update in the / directory: [super-linter/super-linter](https://github.com/super-linter/super-linter). Updates `super-linter/super-linter` from slim-v8.0.0 to slim-v8.6.0 - [Release notes](https://github.com/super-linter/super-linter/releases) - [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md) - [Commits](super-linter/super-linter@v8...v8.6.0) --- updated-dependencies: - dependency-name: super-linter/super-linter dependency-version: slim-v8.6.0 dependency-type: direct:production dependency-group: docker-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent 66578f5 commit 01f8987

54 files changed

Lines changed: 3744 additions & 3653 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
2-
"name": "ci-github-common",
3-
"image": "mcr.microsoft.com/devcontainers/base:debian",
4-
"features": {
5-
"ghcr.io/devcontainers/features/docker-in-docker:3": {
6-
"moby": false
7-
},
8-
"ghcr.io/devcontainers/features/github-cli:1": {
9-
"extensions": "nektos/gh-act"
10-
}
11-
},
12-
"remoteEnv": {
13-
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
14-
},
15-
"customizations": {
16-
"vscode": {
17-
"extensions": [
18-
"eamodio.gitlens",
19-
"github.vscode-github-actions",
20-
"github.copilot",
21-
"github.copilot-chat",
22-
"ms-vscode.makefile-tools",
23-
"esbenp.prettier-vscode"
24-
],
25-
"settings": {
26-
"terminal.integrated.defaultProfile.linux": "zsh"
27-
}
28-
}
29-
}
2+
"name": "ci-github-common",
3+
"image": "mcr.microsoft.com/devcontainers/base:debian",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:3": {
6+
"moby": false
7+
},
8+
"ghcr.io/devcontainers/features/github-cli:1": {
9+
"extensions": "nektos/gh-act"
10+
}
11+
},
12+
"remoteEnv": {
13+
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"eamodio.gitlens",
19+
"github.vscode-github-actions",
20+
"github.copilot",
21+
"github.copilot-chat",
22+
"ms-vscode.makefile-tools",
23+
"esbenp.prettier-vscode"
24+
],
25+
"settings": {
26+
"terminal.integrated.defaultProfile.linux": "zsh"
27+
}
28+
}
29+
}
3030
}

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ updates:
3838
interval: weekly
3939
day: friday
4040
time: "04:00"
41+
cooldown:
42+
default-days: 7
43+
semver-major-days: 7
44+
semver-minor-days: 5
45+
semver-patch-days: 3
4146
groups:
4247
npm-dependencies:
4348
patterns:

.github/linters/.codespellrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[codespell]
2+
skip = *.svg

.github/linters/.jscpd.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"threshold": 5,
3-
"ignore": ["**/node_modules/**", "**/actions/**/coverage/**"]
2+
"threshold": 5,
3+
"ignore": ["**/node_modules/**", "**/actions/**/coverage/**"]
44
}

.github/workflows/greetings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ jobs:
5555
steps:
5656
- uses: actions/first-interaction@1c4688942c71f71d4f5502a26ea67c331730fa4d # v3.1.0
5757
with:
58-
repo_token: ${{ secrets.github-token || github.token }}
58+
repo_token: ${{ secrets.github-token || github.token }} # zizmor: ignore[secrets-outside-env] reusable workflow token override is intentional
5959
issue_message: ${{ inputs.issue_message || 'Hi, thank for reporting an issue, we will check it out very soon' }}
6060
pr_message: ${{ inputs.pr_message || 'Hi, thank you for creating your PR, we will check it out very soon' }}

.github/workflows/linter.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ jobs:
8686
# See https://github.com/super-linter/super-linter.
8787
linter-env: ""
8888

89+
# Lint toolchain to use for Super-Linter frontend validators.
90+
# Supported values: biome, eslint-prettier.
91+
#
92+
# Default: `biome`
93+
linter-toolchain: biome
94+
8995
# JSON array of languages to analyze with CodeQL.
9096
# See https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/.
9197
# Leave empty to disable the check.
@@ -125,6 +131,8 @@ jobs:
125131
| | See <https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job>. | | | |
126132
| **`linter-env`** | Environment variables in multilines format "key=value" to pass to the linter. | **false** | **string** | - |
127133
| | See <https://github.com/super-linter/super-linter>. | | | |
134+
| **`linter-toolchain`** | Lint toolchain to use for Super-Linter frontend validators. | **false** | **string** | `biome` |
135+
| | Supported values: biome, eslint-prettier. | | | |
128136
| **`codeql-languages`** | JSON array of languages to analyze with CodeQL. | **false** | **string** | `["actions"]` |
129137
| | See <https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/>. | | | |
130138
| | Leave empty to disable the check. | | | |

.github/workflows/linter.yml

Lines changed: 93 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ on:
2222
See https://github.com/super-linter/super-linter.
2323
type: string
2424
required: false
25+
linter-toolchain:
26+
description: |
27+
Lint toolchain to use for Super-Linter frontend validators.
28+
Supported values: biome, eslint-prettier.
29+
type: string
30+
required: false
31+
default: biome
2532
codeql-languages:
2633
description: |
2734
JSON array of languages to analyze with CodeQL.
@@ -75,14 +82,92 @@ jobs:
7582
fetch-depth: "${{ inputs.lint-all && 1 || 0 }}"
7683
persist-credentials: false
7784

78-
- if: ${{ inputs.linter-env }}
85+
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
7986
env:
8087
LINTER_ENV: ${{ inputs.linter-env }}
81-
run: |
82-
echo "$LINTER_ENV" | while IFS= read -r line; do
83-
if [ -z "$line" ]; then continue; fi
84-
echo "$line" >> "$GITHUB_ENV"
85-
done
88+
LINTER_TOOLCHAIN: ${{ inputs.linter-toolchain }}
89+
with:
90+
script: |
91+
const toolchainVariables = {
92+
biome: {
93+
VALIDATE_CSS: "false",
94+
VALIDATE_CSS_PRETTIER: "false",
95+
VALIDATE_GRAPHQL_PRETTIER: "false",
96+
VALIDATE_HTML_PRETTIER: "false",
97+
VALIDATE_JAVASCRIPT_ES: "false",
98+
VALIDATE_JAVASCRIPT_PRETTIER: "false",
99+
VALIDATE_JSON: "false",
100+
VALIDATE_JSON_PRETTIER: "false",
101+
VALIDATE_JSONC: "false",
102+
VALIDATE_JSONC_PRETTIER: "false",
103+
VALIDATE_JSX: "false",
104+
VALIDATE_JSX_PRETTIER: "false",
105+
VALIDATE_TYPESCRIPT_ES: "false",
106+
VALIDATE_TYPESCRIPT_PRETTIER: "false",
107+
VALIDATE_TSX: "false",
108+
VALIDATE_VUE: "false",
109+
VALIDATE_VUE_PRETTIER: "false",
110+
},
111+
"eslint-prettier": {
112+
VALIDATE_BIOME_FORMAT: "false",
113+
VALIDATE_BIOME_LINT: "false",
114+
},
115+
};
116+
117+
function parseEnvironmentLines(serializedEnvironment) {
118+
const environment = new Map();
119+
120+
for (const rawLine of serializedEnvironment.split("\n")) {
121+
const line = rawLine.trim();
122+
if (line === "") {
123+
continue;
124+
}
125+
126+
const separatorIndex = line.indexOf("=");
127+
if (separatorIndex <= 0) {
128+
throw new Error(`Invalid linter-env entry: ${rawLine}`);
129+
}
130+
131+
const key = line.slice(0, separatorIndex).trim();
132+
const value = line.slice(separatorIndex + 1);
133+
if (key === "") {
134+
throw new Error(`Invalid linter-env entry: ${rawLine}`);
135+
}
136+
137+
environment.set(key, value);
138+
}
139+
140+
return environment;
141+
}
142+
143+
function getToolchainEnvironment(toolchain) {
144+
const environment = toolchainVariables[toolchain];
145+
if (!environment) {
146+
throw new Error(`Unsupported lint toolchain: ${toolchain}`);
147+
}
148+
149+
return environment;
150+
}
151+
152+
function mergeEnvironment(customEnvironment, defaultEnvironment) {
153+
const mergedEnvironment = new Map(customEnvironment);
154+
155+
for (const [key, value] of Object.entries(defaultEnvironment)) {
156+
if (!mergedEnvironment.has(key)) {
157+
mergedEnvironment.set(key, value);
158+
}
159+
}
160+
161+
return mergedEnvironment;
162+
}
163+
164+
const customEnvironment = parseEnvironmentLines(process.env.LINTER_ENV ?? "");
165+
const defaultEnvironment = getToolchainEnvironment(process.env.LINTER_TOOLCHAIN);
166+
const mergedEnvironment = mergeEnvironment(customEnvironment, defaultEnvironment);
167+
168+
for (const [key, value] of mergedEnvironment) {
169+
core.exportVariable(key, value);
170+
}
86171
87172
# FIXME: superlinter should auto install required dependencies. See https://github.com/super-linter/super-linter/issues/6089.
88173
- id: has-prettier-plugins
@@ -104,12 +189,12 @@ jobs:
104189
with:
105190
working-directory: ${{ steps.has-prettier-plugins.outputs.package-json-dir }}
106191

107-
- uses: super-linter/super-linter/slim@5119dcd8011e92182ce8219d9e9efc82f16fddb6 # v8.0.0
192+
- uses: super-linter/super-linter/slim@9e863354e3ff62e0727d37183162c4a88873df41 # v8.6.0
108193
env:
109194
VALIDATE_ALL_CODEBASE: ${{ inputs.lint-all }}
110195
LOG_LEVEL: WARN
111196
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
112-
GITHUB_TOKEN: ${{ secrets.github-token || github.token }}
197+
GITHUB_TOKEN: ${{ secrets.github-token || github.token }} # zizmor: ignore[secrets-outside-env] reusable workflow token override is intentional
113198
IGNORE_GITIGNORED_FILES: "true"
114199

115200
codeql:

.github/workflows/semantic-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545
steps:
4646
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
4747
env:
48-
GITHUB_TOKEN: ${{ secrets.github-token || github.token }}
48+
GITHUB_TOKEN: ${{ secrets.github-token || github.token }} # zizmor: ignore[secrets-outside-env] reusable workflow token override is intentional

Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
FROM ghcr.io/super-linter/super-linter:slim-v8.0.0
1+
FROM ghcr.io/hoverkraft-tech/docker-base-images/super-linter:0.1.0
22

33
HEALTHCHECK --interval=5m --timeout=10s --start-period=30s --retries=3 CMD ["/bin/sh","-c","test -d /github/home"]
44
ARG UID=1000
55
ARG GID=1000
6-
RUN chown -R ${UID}:${GID} /github/home
7-
USER ${UID}:${GID}
8-
9-
ENV RUN_LOCAL=true
10-
ENV USE_FIND_ALGORITHM=true
11-
ENV LOG_LEVEL=WARN
12-
ENV LOG_FILE="/github/home/logs"
6+
USER ${UID}:${GID}

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ lint: ## Execute linting
88

99
lint-fix: ## Execute linting and fix
1010
$(call run_linter, \
11-
-e FIX_JSON_PRETTIER=true \
12-
-e FIX_JAVASCRIPT_PRETTIER=true \
13-
-e FIX_YAML_PRETTIER=true \
1411
-e FIX_MARKDOWN=true \
15-
-e FIX_MARKDOWN_PRETTIER=true \
1612
-e FIX_NATURAL_LANGUAGE=true \
1713
-e FIX_SHELL_SHFMT=true \
14+
-e FIX_BIOME_LINT=true \
15+
-e FIX_BIOME_FORMAT=true \
1816
)
1917

2018
setup: ## Install npm dependencies for all package.json files under actions/
@@ -43,7 +41,6 @@ define run_linter
4341
docker run \
4442
-e DEFAULT_WORKSPACE="$$DEFAULT_WORKSPACE" \
4543
-e FILTER_REGEX_INCLUDE="$(filter-out $@,$(MAKECMDGOALS))" \
46-
-e IGNORE_GITIGNORED_FILES=true \
4744
$(1) \
4845
-v $$VOLUME \
4946
--rm \

0 commit comments

Comments
 (0)