Skip to content

.editorconfig is not considered, when its part of the .gitignore #1582

@Eckii24

Description

@Eckii24

In the following implementation, the ignore file is explicitly considered, when searching for a configuration file:

if (file.Exists && !ignoreFile.IsIgnored(file.FullName))

Does it really make sense to consider the ignore file, when searching for the configuration?
Wouldn't it be better to only consider the ignore file when determining files to format?

Environments:

  • CSharpier Version: 1.0.0
  • Running CSharpier via: dotnet cli
  • Operating System: Debian

Steps to reproduce:

  • Add the .editorconfig to the .gitignore
  • Apply the formatting

Expected behavior:

  • .gitignore should only be applied when determining files to format
  • .editorconfig is considered

Actual behavior:

  • .gitignore is also applied when looking for configuration files
  • .editorconfig is not considered at all

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions