Open markeissler opened 2 years ago
Well, this is a tough one. We need to save a file so that SwiftLint is able to process it (as I've said already, I do not know how to successfully use stdin instead of a file). So yes, SwiftLint saves file before checking it (src/com/lonelybytes/swiftlint/annotator/SwiftLintHighlightingAnnotator.kt:82). And yes, it does not work without it.
Don't have a solution for this for now :(
PS. If you need specific Swift formatting rules, please tell JetBrains about that. They are really awesome in formatting other languages, it is very sad that Swift is not being formatted properly. I'm trying to improve that, but more bugs/votes will always help.
No problem. I'll see if I can dig into this a little more.
It's not clear what the resolution was before or if the issue was
Possibly I just tried to experiment with stdin solution and thought that everything will be cool. :-)
Any development on this? I'm using Injection to hot refresh my UI when developing and because of the constant persisting of the files the hot reload goes crazy....
Unfortunately no, sorry. Right now I need to find out how to use new plugin framework for IJ IDEs. I will update the plugin itself right after.
This is an issue that has occurred previously:
Issue #51: Swiftlint plugin is triggering the plugin File Watcher
It's not clear what the resolution was before or if the issue was, in fact, resolved since the issue reporter did not respond for further comments.
In particular, I have a watcher setup to trigger
swiftformat
on a file save. With all other inspections disabled, any change to a file (without manually saving, auto-save disabled) results on swiftlint running but then also a trigger of theswiftformat
File Watcher as the file is visibly reformatted.