Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

--respect-ignores: does not correctly ignore folders without the globbing pattern  #845

@wookayin

Description

@wookayin

Problem: .styluaignore does not ignore folders or directories like .gitignore, .rgignore, etc. do. Instead, full globbing patterns (*.lua or **/*.lua) would be needed to ignore all files under a directory.

EDIT: This seems to be the case only when used with --respect-ignores <pattern>.

Example

(Tested with stylua 0.19.1, which already includes #765)

Let's say we have src/foo.lua and build/foo.lua in the project root (with .styluaignore).

Current behavior

With the following .styluaignore:

build/

$ stylua --check --respect-ignores build/foo.lua would not ignore build/foo.lua.

Expected behavior

build/foo.lua should be ignored.

Current behavior (2)

With the following .styluaignore:

build/**/*.lua

$ stylua --check --respect-ignores build/foo.lua does ignore build/foo.lua. This behavior is consistent with .gitignore, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions