This PR improves support for running --lint when providing input from stdin. The reporter.write is now invoked similarly to how it is when the file is read directly from disk.
There is still one issue I've not figured out. The indent rule is flagged for every single line of the input when supplied via stdin. Must be something to do with how it is read/how the rule detects newlines/indentation.
However, I think that could warrant its own issue and PR if this one is accepted.
As an aside, I don't use xcode, just the swift cli and swift package manager, so not sure if anything else is required for this change.
closes #1741
This PR improves support for running
--lint
when providing input from stdin. The reporter.write is now invoked similarly to how it is when the file is read directly from disk.There is still one issue I've not figured out. The
indent
rule is flagged for every single line of the input when supplied via stdin. Must be something to do with how it is read/how the rule detects newlines/indentation.However, I think that could warrant its own issue and PR if this one is accepted.
As an aside, I don't use xcode, just the swift cli and swift package manager, so not sure if anything else is required for this change.