Skip to content

Commit

Permalink
Update readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Sep 16, 2023
1 parent fd42729 commit 55d746c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added flag `--respect-ignores`. By default, files explicitly passed to stylua (e.g. `stylua foo.lua`) will always be formatted, regardless of whether the file is ignored. Enabling this flag will consider `.styluaignore` or glob matches before formatting the file.

## [0.18.2] - 2023-09-10

### Fixed
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ stylua -g '*.lua' -g '!*.spec.lua' -- . # format all Lua files except test files

Note, if you are using the glob argument, it can take in multiple strings, so `--` is required to break between the glob pattern and the files to format.

Glob Filtering is only used for directory searching - passing a file directly (e.g. `stylua foo.txt`) will override the glob.
By default, glob filtering (and `.styluaignore` files) are only applied for directory traversal and searching.
Files passed directly (e.g. `stylua foo.txt`) will override the glob / ignore and always be formatted.
To disable this behaviour, pass the `--respect-ignores` flag (`stylua --respect-ignores foo.txt`).

### Filtering using `.styluaignore`

Expand Down

0 comments on commit 55d746c

Please sign in to comment.