-
Notifications
You must be signed in to change notification settings - Fork 503
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
The CLI silently fails when attempting to use an invalid command #629
Comments
In your example Imho exit code |
@Tapchicoma Thanks for the explanation. However, I still believe that the exit code isn't valid, as top level commands ( I see why it isn't an easy fix. One option to inform users about a misspelling or invalid command could be to print a warning such as "no files matched" to stderr. |
…es are found that match with the globs Closes pinterest#629
…1537) * Expand (existing) directory to globs for default kotlin extensions * When an (existing) directory (without glob pattern) is specified then only process files with default kotlin extensions in that directory or its subdirectories. This is equivalent to execute ktlint in that directory without specifying any pattern. Closes #917 * When a glob does not contain an absolute path then do not prefix it with the root directory but instead ensure that it is prefixed it with the "**/" matcher. In this way files directly inside the workdir are matched as well as files in subdirectories of the workdir. * Print an error message and return with non-zero exit code when no files are found that match with the globs Closes #629 * Refactor by eliminating variable project2Files * Refactor to improve readability and consistency * Extract constants to private values. Align name of test class with production class. * Remove characters which may cause a problem on Windows * Normalize paths for Windows build * Disable tests on Windows using absolute paths as those are not supported by jimfs
There is no response for invalid commands, nor any indication via the exit code:
Expected Behaviour:
A typo or invalid command should generate an error message and return with a non-zero exit code.
The text was updated successfully, but these errors were encountered: