Skip to content

Commit

Permalink
feat: Add bootstrap support editorconfig (#25)
Browse files Browse the repository at this point in the history
Add support to add editorconfig file to projects with bootstrap command.
  • Loading branch information
buep authored Aug 12, 2024
1 parent 49e13d1 commit 881d9be
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
53 changes: 53 additions & 0 deletions devbox-plugins/base-config/config/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This files was added by a devbox script from our devops tools project and is maintained there:
# https://github.com/onlinecity/devops-tools
#
# The specific editorconfig file is inherited "through generations" of devops teams in OnlineCity,
# so when added as part of devops-tools we don't know they origin of the file, nor the reasons of
# choices in it.
# However it is a good fit with current code base, so we keep it as is for now.
# Bue Petersen added it here, who received the file as addded from Tjalfe Møller who used it together with Adam Tulenius and others - all earlier devops team members.

# Don't scan for other configs, this is considered our topmost file in the hierarchy
# as we add it to each project.
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space

[*.py]
indent_size = 4

[*.rs]
indent_size = 4

[*.go]
indent_size = 8
indent_style = tab

[*.cr]
indent_size = 2

[*.json]
indent_size = 2

[*.{yaml,yml}]
indent_size = 2

[*.charset]
insert_final_newline = false

[*.css]
indent_size = 2

[*.html]
indent_size = 2

[*.txt]
indent_size = 2

[Makefile]
indent_style = tab
6 changes: 6 additions & 0 deletions devbox-plugins/base-config/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"{{ .Virtenv }}/pre-commit-config-tfdocs.yaml": "config/pre-commit-config-tfdocs.yaml",
"{{ .Virtenv }}/.yamllint": "config/.yamllint",
"{{ .Virtenv }}/taskfile.yml": "config/taskfile.yml",
"{{ .Virtenv }}/.editorconfig": "config/.editorconfig",
"{{ .Virtenv }}/release-please.yml": "config/release-please.yml",
"{{ .Virtenv }}/dependabot-gitsubmodules.yml": "config/dependabot-gitsubmodules.yml",
"{{ .Virtenv }}/ansible.cfg": "config/ansible.cfg",
Expand Down Expand Up @@ -104,6 +105,11 @@
"cp {{ .Virtenv }}/.yamllint .yamllint",
"echo 'Bootstrapping done'"
],
"bootstrap-editorconfig": [
"echo 'Bootstrapping editorconfig'",
"cp {{ .Virtenv }}/.editorconfig .editorconfig",
"echo 'Bootstrapping editorconfig done'"
],
"bootstrap-taskfile": [
"echo 'Bootstrapping taskfile'",
"cp {{ .Virtenv }}/taskfile.yml taskfile.yml",
Expand Down

0 comments on commit 881d9be

Please sign in to comment.