Skip to content

Commit 4fe99f0

Browse files
committed
Cleaned up?
1 parent 915863e commit 4fe99f0

File tree

95 files changed

+520
-136
lines changed

Some content is hidden

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

95 files changed

+520
-136
lines changed

.github/workflows/documentation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v4
2626
- uses: arduino/setup-task@v2
2727
- run: |
28-
task github-actions:update-headers --yes
28+
task github-actions:template-headers-update --yes
2929
# Check that files hav not changed.
3030
- run: |
3131
git diff --exit-code github/workflows/

.markdownlint.jsonc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.markdownlint.jsonc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// markdownlint-cli configuration file (cf. https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration)
2+
{
3+
"default": true,
4+
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md
5+
"line-length": {
6+
"line_length": 120,
7+
"code_blocks": false,
8+
"tables": false
9+
},
10+
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md
11+
"no-duplicate-heading": {
12+
"siblings_only": true
13+
},
14+
// https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections#creating-a-collapsed-section
15+
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md
16+
"no-inline-html": {
17+
"allowed_elements": ["details", "summary"]
18+
}
19+
}

.markdownlintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.markdownlintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#ignoring-files
2+
vendor/
3+
node_modules/
4+
LICENSE.md
5+
# Drupal
6+
web/*.md
7+
web/core/
8+
web/*/contrib/

Taskfile.yml

Lines changed: 5 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
version: '3'
44

5+
includes:
6+
github-actions: ./task/Tasfile.github-actions.yml
7+
58
vars:
69
GITHUB_ACTIONS_TEMPLATES_HEADER: |
710
# Github Actions templates
@@ -16,63 +19,11 @@ vars:
1619
GITHUB_ACTIONS_TEMPLATES_FOOTER: |
1720
1821
tasks:
19-
github-actions:documentation:update:
20-
desc: "Update GitHub Actions template documentation"
21-
sources:
22-
- github/workflows/*.yaml
23-
generates:
24-
- docs/github-action-templates.md
25-
cmds:
26-
- mkdir -p docs
27-
- |
28-
echo '{{.GITHUB_ACTIONS_TEMPLATES_HEADER}}' > docs/github-action-templates.md
29-
- |
30-
for f in github/workflows/*.yaml; do
31-
echo "" >> docs/github-action-templates.md
32-
echo "---" >> docs/github-action-templates.md
33-
echo "" >> docs/github-action-templates.md
34-
35-
echo "[$f]($f)" >> docs/github-action-templates.md
36-
37-
cat "$f" | grep -E '^###( |$)' | sed -E -e 's/^### ?//' >> docs/github-action-templates.md
38-
done
39-
- |
40-
echo "{{.GITHUB_ACTIONS_TEMPLATES_FOOTER}}" >> docs/github-action-templates.md
41-
# Link to clean up.
42-
- task lint:markdown -- docs/github-action-templates.md
43-
44-
github-actions:update-headers:
45-
prompt: "Updating headers may break things, so check result afterwards. Really update headers?"
46-
desc: "Update headers in GitHub Actions templates"
47-
cmds:
48-
- |
49-
for f in github/workflows/*.yaml; do
50-
echo "$f"
51-
# If file starts with `# ` …
52-
if [[ $(head --lines=1 "$f") =~ "^# " ]]; then
53-
# … replace the header.
54-
# This is done by deleting all lines from the top of the file to a blank line.
55-
docker run --rm --volume=$PWD:/app --user ${COMPOSE_USER:-deploy} itkdev/php8.3-fpm:latest sed -i '1,/^$/d' "$f"
56-
fi
57-
58-
# Write header and file into temporary file.
59-
(
60-
echo "# Do not edit this file! Make a pull request on changing";
61-
echo "# $f in";
62-
echo "# https://github.com/itk-dev/devops_itkdev-docker if need be.";
63-
echo "";
64-
cat "$f"
65-
) > "$f.tmp"
66-
# Replace original file with temporary file.
67-
mv "$f.tmp" "$f"
68-
done
69-
7022
lint:markdown:
7123
desc: "Lint Markdown"
7224
cmds:
73-
# I cannot get itkdev/markdownlint to work as expected, i.e. as peterdavehello/markdownlint does …
74-
- docker run --rm --volume "$PWD":/md peterdavehello/markdownlint markdownlint {{.GLOB}} --fix
75-
- docker run --rm --volume "$PWD":/md peterdavehello/markdownlint markdownlint {{.GLOB}}
25+
- docker run --rm --volume "$PWD":/md itkdev/markdownlint markdownlint {{.GLOB}} --fix
26+
- docker run --rm --volume "$PWD":/md itkdev/markdownlint markdownlint {{.GLOB}}
7627
vars:
7728
# We use a block scalar (https://yaml-multiline.info/#block-scalars) here to make escaping (a little) easier.
7829
GLOB: >-

config/drupal/php/phpcs.xml

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
// https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file
3+
$config = new TwigCsFixer\Config\Config();
4+
5+
return $config;

0 commit comments

Comments
 (0)