-
Notifications
You must be signed in to change notification settings - Fork 6
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
CI: add julia-format action #182
CI: add julia-format action #182
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## reformat #182 +/- ##
===========================================
Coverage ? 67.10%
===========================================
Files ? 51
Lines ? 2490
Branches ? 0
===========================================
Hits ? 1671
Misses ? 819
Partials ? 0 ☔ View full report in Codecov by Sentry. |
Nice, I now also added formatter to the test (so you are also told locally that you have to reformat before making a PR). Is there any reason why you are using |
No, I was just exploring the logic of this action. AFAIK, v3 is not yet released, but v2 should do the same thing, except it would not fail if it detects format violations outside of the lines affected by the PR. |
ae6e408
into
StructuralEquationModels:reformat
This adds the automatic format check via JuliaFormatter.jl and GitHub code suggestions using julia-format action.
This is an example of how it would look: alyst#2
Note that it would only suggest code formatting to the files modified by the PR, so to format the whole current codebase, a separate PR is required (it is as simple as running
using JuliaFormatter; format(".")
-- JuliaFormatter don't have to be a SEM.jl dependency, you can install it in the temporary Julia project; just the working folder should point to SEM.jl).The formatting rules are specified in .JuliaFormatter.toml. Right now it is using the default formatting style.
Check the JuliaFormatter.jl docs for how to tune it to match to your preference.
I thought that it would be nice to fix the formatting before #181. One reason -- that PR contains many no-op whitespace changes (removal of trailing whitespace etc), which compilcate the review.
Fixes #169