Commit f6507c92 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch...

Merge branch '16143-add-editorconfig-to-keep-coding-style-consistance-for-different-ide-editors' into 'master'

Resolve "Add .editorconfig to keep coding style consistance for different IDE/Editors"

Closes #16143

See merge request gitlab-org/gitlab!25835
parents fdba741e 867004cd
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
[*.{js,json,vue,scss,rb,haml,yml}]
indent_size = 2
[*.{js,json,vue,scss,rb,haml,yml,md}]
indent_style = space
charset = utf-8
...@@ -56,6 +56,7 @@ Dangerfile @gl-quality/eng-prod ...@@ -56,6 +56,7 @@ Dangerfile @gl-quality/eng-prod
/lib/gitlab/danger/ @gl-quality/eng-prod /lib/gitlab/danger/ @gl-quality/eng-prod
/scripts/ @gl-quality/eng-prod /scripts/ @gl-quality/eng-prod
/scripts/frontend/ @gl-quality/eng-prod @gitlab-org/maintainers/frontend /scripts/frontend/ @gl-quality/eng-prod @gitlab-org/maintainers/frontend
.editorconfig @gl-quality/eng-prod
# Telemetry owner files # Telemetry owner files
/ee/lib/gitlab/usage_data_counters/ @gitlab-org/growth/telemetry /ee/lib/gitlab/usage_data_counters/ @gitlab-org/growth/telemetry
......
# Style guides # Style guides
## Editor/IDE styling standardization
We use [EditorConfig](https://editorconfig.org/) to automatically apply certain styling
standards before files are saved locally. Most editors/IDEs will honor the `.editorconfig`
settings automatically by default. If your editor/IDE does not automatically support `.editorconfig`,
we suggest investigating to see if a plugin exists. For instance here is the
[plugin for vim](https://github.com/editorconfig/editorconfig-vim).
## Pre-commit static analysis ## Pre-commit static analysis
You're strongly advised to install You're strongly advised to install
......
...@@ -133,6 +133,7 @@ module Gitlab ...@@ -133,6 +133,7 @@ module Gitlab
%r{\A(\.gitlab-ci\.yml\z|\.gitlab\/ci)} => :engineering_productivity, %r{\A(\.gitlab-ci\.yml\z|\.gitlab\/ci)} => :engineering_productivity,
%r{\A\.overcommit\.yml\.example\z} => :engineering_productivity, %r{\A\.overcommit\.yml\.example\z} => :engineering_productivity,
%r{\Atooling/overcommit/} => :engineering_productivity, %r{\Atooling/overcommit/} => :engineering_productivity,
%r{\A.editorconfig\z} => :engineering_productivity,
%r{Dangerfile\z} => :engineering_productivity, %r{Dangerfile\z} => :engineering_productivity,
%r{\A(ee/)?(danger/|lib/gitlab/danger/)} => :engineering_productivity, %r{\A(ee/)?(danger/|lib/gitlab/danger/)} => :engineering_productivity,
%r{\A(ee/)?scripts/} => :engineering_productivity, %r{\A(ee/)?scripts/} => :engineering_productivity,
......
...@@ -222,6 +222,7 @@ describe Gitlab::Danger::Helper do ...@@ -222,6 +222,7 @@ describe Gitlab::Danger::Helper do
'lib/gitlab/danger/foo' | :engineering_productivity 'lib/gitlab/danger/foo' | :engineering_productivity
'ee/lib/gitlab/danger/foo' | :engineering_productivity 'ee/lib/gitlab/danger/foo' | :engineering_productivity
'.overcommit.yml.example' | :engineering_productivity '.overcommit.yml.example' | :engineering_productivity
'.editorconfig' | :engineering_productivity
'tooling/overcommit/foo' | :engineering_productivity 'tooling/overcommit/foo' | :engineering_productivity
'lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml' | :backend 'lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml' | :backend
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment