-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rocks check
#289
feat: rocks check
#289
Conversation
Will fix the failing build in a bit. |
07e1fa9
to
e6b51e6
Compare
vec![ | ||
project.root().to_string_lossy().into(), | ||
"--exclude-files".into(), | ||
project | ||
.tree(LuaVersion::from(&config)?)? | ||
.root() | ||
.to_string_lossy() | ||
.to_string(), | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion:
vec![ | |
project.root().to_string_lossy().into(), | |
"--exclude-files".into(), | |
project | |
.tree(LuaVersion::from(&config)?)? | |
.root() | |
.to_string_lossy() | |
.to_string(), | |
], | |
vec![ | |
format!("{}", project.root().display()), | |
"--exclude-files".into(), | |
format!("{}", project | |
.tree(LuaVersion::from(&config)?)? | |
.root() | |
.display()), | |
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if that's actually better, but apparently display()
is safer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
display()
does essentially the same thing as to_string_lossy
by replacing all invalid unicode chars with the replacement character. Amounts to the same code in the end :)
Adds a simple implementation of
rocks check
, which ensuresluacheck
is installed and runs it for the whole source directory of a given project.Similarly to
rocks fmt
, we'll want to expand this to take in a path as an argument for finer control.I don't believe we should let the user control
luacheck
with flags, that should be up to the luacheckrc file.