Skip to content

editorconfig settings for [*] do not get applied to hidden files in Web IDE

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When using the Web IDE in conjunction with a .editorconfig file that applies rules via the [*] file spec, it doesn't apply those rules to hidden files such as the .gitlab-ci.yml file.

Steps to reproduce

  1. Create repo with a .editorconfig with the following content:
# This file is the top-most EditorConfig file
root = true

# All Files
[*]
trim_trailing_whitespace = true
  1. Create a hidden files (e.g. .gitlab-ci.yml) with whitespace at the end of a line
  2. Save the file (toggle to a different file)

Example Project

https://gitlab.com/-/ide/project/peanderson/editorconfig_test

What is the current bug behavior?

Files end up incorrectly formatted when committed to source control

What is the expected correct behavior?

[*] rules should be applied to hidden files (files that start with .)

Relevant logs and/or screenshots

Has whitespace:
image

No whitespace (only newline char):
image

Output of checks

This bug happens on GitLab.com

Edited by 🤖 GitLab Bot 🤖