.styluaignore
in CWD is incorrectly ignored if cwd not included in paths to format
#249
Labels
bug
Something isn't working
If you have a project structured such as
and you run
stylua src
(because you don't want to format thetests
folder), it doesn't use the.styluaignore
present in the current working directory.e.g. if
.styluaignore
mentioned to ignorebar.lua
, it would be ignored if you runstylua .
, but it will still be formatted if you runstylua src
. This is because the.styluaignore
file isn't actually ever "noticed" by the directory walker, since the cwd wasn't passed as a starting point.This behaviour is confusing, as you would expect the
.styluaignore
to be taken into account if it was present in the cwd where stylua was ran.The text was updated successfully, but these errors were encountered: