Conversation
…e()" This reverts commit 3f05d5e.
| import Runic | ||
| julia_files = readlines(`git ls-files -- "*.jl"`) | ||
| if isempty(julia_files) | ||
| println("Runic: no .jl files tracked, skipping.") | ||
| else | ||
| Runic.main(append!(["--inplace"], julia_files)) |
There was a problem hiding this comment.
I think you can use Runic.main(["--inplace", "."]) as well, right? Is there a reason to discard the paths and use git ls-files?
There was a problem hiding this comment.
runic-action use git ls-files internally so I used same here and too avoid touching git ignored files too.
There was a problem hiding this comment.
I see. But AFAICT, it should be fine to format gitignored files because the success/failure check later on uses git diff. I didn't check the source code, but I also expect that the reviewdog action should only comment on files that git tracks (after all there's no way it can add a review comment to a file that's not even in the repo).
I'm not really all that fussed about it, I just think it'd be more consistent to use the same arguments and do the same things with both formatters.
There was a problem hiding this comment.
Somewhat agree, I have updated code, does it look fine now?
Adds a
formatterinput (juliaformatter|runic) so repos can opt into Runic. JuliaFormatter remains the default.Closes #23