Skip to content

Commit 169ad9b

Browse files
committed
Added general .editorconfig file
1 parent c89c03f commit 169ad9b

File tree

11 files changed

+58
-0
lines changed

11 files changed

+58
-0
lines changed

config/.editorconfig

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This file is copied from config/.editorconfig in https://github.com/itk-dev/devops_itkdev-docker.
2+
# Feel free to edit the file, but consider making a pull request if you find a general issue with the file.
3+
4+
# EditorConfig is awesome: https://editorconfig.org
5+
6+
# top-most EditorConfig file
7+
root = true
8+
9+
[*]
10+
charset = utf-8
11+
end_of_line = LF
12+
indent_size = 4
13+
indent_style = space
14+
insert_final_newline = true
15+
trim_trailing_whitespace = true
16+
17+
# Assets
18+
[*.{js,css,scss}]
19+
indent_size = 2
20+
21+
[*.{yml,yaml}]
22+
indent_size = 2
23+
24+
# Symfony config
25+
[config/**/*.{yml,yaml}]
26+
indent_size = 4
27+
28+
# Drupal config (must come after "Symfony config", cf. https://spec.editorconfig.org/#file-processing)
29+
[config/sync/**/*.{yml,yaml}]
30+
indent_size = 2
31+
32+
## Drupal custom code
33+
[web/*/custom/**]
34+
indent_size = 2

task/scripts/github-actions-link

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ for template_dir in templates/*; do
3838
exit 1
3939
fi
4040

41+
# General config files.
42+
# We first check for files on the config folder and then we check for project
43+
# specific files (in effect letting projects override the general config
44+
# files).
45+
for config_dir in config "config/$project_type"; do
46+
echo "$config_dir"
47+
# Some config files are hidden
48+
GLOBIGNORE=".:.."
49+
for config_file in "$config_dir"/*; do
50+
if [ -f "$config_file" ]; then
51+
ln -sf "../../$config_file" "$template_dir/"
52+
fi
53+
done
54+
done
55+
4156
for f in $(find github/workflows/ -name '*.yaml' | sort); do
4257
source_file_name=''
4358
# Note: / is NOT a regex delimiter here, but an actual /, i.e. a directory separator.

templates/drupal-10/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../config/.editorconfig

templates/drupal-11/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../config/.editorconfig

templates/drupal-7/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../config/.editorconfig

templates/drupal-8/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../config/.editorconfig

templates/drupal-9/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../config/.editorconfig

templates/drupal-module/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../config/.editorconfig

templates/symfony-3/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../config/.editorconfig

templates/symfony-4/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../config/.editorconfig

0 commit comments

Comments
 (0)