Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Reading from standard in broken? #51

Closed
francis36012 opened this issue May 31, 2017 · 1 comment
Closed

Reading from standard in broken? #51

francis36012 opened this issue May 31, 2017 · 1 comment

Comments

@francis36012
Copy link

I'm trying to use the --stdin flag but ktlint doesn't seem to be getting anything from standard in.

Here is a transcript of my terminal session:

francis::aether:ktlint.git [master %=] cat test.kt 
import java.io.File

fun main(args: Array<String>) {
}
francis::aether:ktlint.git [master %=] ktlint --stdin --debug < test.kt
[DEBUG] Discovered ruleset "standard"
[DEBUG] Checking <text>
[DEBUG] 367ms / 0file(s) / 0error(s)
francis::aether:ktlint.git [master %=] ktlint --stdin --debug          
[DEBUG] Discovered ruleset "standard"
import java.io.File

fun main(args: Array<String>) {
}
[DEBUG] Checking <text>
[DEBUG] 11032ms / 0file(s) / 0error(s)

I was expecting an unused import error but as you can see above, no error is produced.

shyiko added a commit that referenced this issue May 31, 2017
@shyiko
Copy link
Collaborator

shyiko commented May 31, 2017

Thank you for the ticket. Fixed in 0.8.1.

@shyiko shyiko closed this as completed May 31, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants