Skip to content

[Finder] Widen ignoreVCSIgnored() scope #49703

Closed
@Wirone

Description

@Wirone

Description

Finder does not ignore files that are ignored using:

  • .git/info/exclude, repo-scoped additional .gitignore
  • core.excludesfile config option that defines global .gitignore

Those use exactly the same mechanism like .gitignore, but can be added locally, differently on each computer. Basically it helps each developer working with the project to fine-tune what should be ignored (e.g. I often create .Stuff directory inside project directory, to keep there notes, example files etc. and I ignore it via global ignore file).

Example

$finder = PhpCsFixer\Finder::create()
    ->in(__DIR__)
    ->ignoreVCSIgnored(true) // this should ignore all the files that are effectively ignored in the __DIR__
;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions