-
Notifications
You must be signed in to change notification settings - Fork 31
Run formatter, start using always_use_return = true #886
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
base: main
Are you sure you want to change the base?
Conversation
Benchmark Report for Commit e366079Computer Information
Benchmark Results
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #886 +/- ##
==========================================
+ Coverage 84.87% 84.89% +0.01%
==========================================
Files 34 34
Lines 3815 3820 +5
==========================================
+ Hits 3238 3243 +5
Misses 577 577 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull Request Test Coverage Report for Build 14377580780Details
💛 - Coveralls |
Last time I checked, JuliaFormatter v2 had some bugs. (For additional context, the initial release of v2 was yanked because there were various bugs: JuliaRegistries/General#117438.) The issue tracker suggests to me that there are still quite a few outstanding issues. Are we sure that it's production ready? Should we be fixing it to v1 instead? https://github.com/TuringLang/actions/blob/e94733241a8cb6a44159eff8eb347c1cb037a53c/Format/action.yml#L19-L25 In an ideal world, I'd love to use v2 and report issues upstream but I fear it might be too annoying to run and compare two different versions of JuliaFormatter. |
That's a good question. v2 was fine on this repo, but I couldn't make a similar PR for Turing.jl because of a Formatter bug. Depends a lot on how quickly the bugs get fixed. I'm happy with fixing to v1 too. |
Something like this is a bit scary: domluna/JuliaFormatter.jl#909 |
We've agreed to stick to v1 for now! |
JuliaFormatter has a new major release, and our GitHub actions are already using it. To catch up, I ran the formatter on all code locally. While I was at it, I enabled
always_use_return = true
, which according to the Blue style guide should be done anyway, but JuliaFormatter doesn't include it in itsBlueStyle
config (see domluna/JuliaFormatter.jl#906).The first commit runs JuliaFormatter v2.1.0 with old settings and does nothing else. The second one removes trailing whitespace. The third adds
always_use_return = true
and its consequences.