Skip to content

Commit

Permalink
Implement check functionality to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Dec 29, 2020
1 parent 54fc275 commit ea402ed
Show file tree
Hide file tree
Showing 5 changed files with 484 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- StyLua will now take into account if a table was originally expanded onto multiple lines. If so, StyLua won't attempt to collapse it
- Added support for reading in from stdin for the CLI, use `stylua -` to make StyLua read from stdin, and a formatted output will be written to stdout
- Added `--check` command line flag. If enabled, then StyLua will check through the files and emit a diff for files with incorrect formatting, exiting with status code 1. StyLua will not modifiy files

### Changed
- Changed when a table will expand onto new lines. It will now expand after 80 characters have been exceeded, and takes indent level into account
Expand Down
114 changes: 114 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ luau = ["full_moon/roblox"]

[dependencies]
anyhow = "1.0.35"
diff = "0.1.12"
full_moon = { version = "0.9.0" }
ignore = "0.4.17"
lazy_static = "1.4.0"
regex = "1.4.2"
serde = "1.0.118"
structopt = "0.3.0"
term = "0.6.1"
toml = "0.5.7"

0 comments on commit ea402ed

Please sign in to comment.