Skip to content

Conversation

@nalimilan
Copy link
Member

Add a JuliaFormatter style using the YAS style, apply it to the code base, and enable a GitHub workflow to add suggestions to PRs to follow the style. Copied from JuliaStats/GLM.jl#603.

@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@JuliaStats JuliaStats deleted a comment from github-actions bot Jan 7, 2026
@devmotion
Copy link
Member

Putting the git-ignore-blame-revs in the PR won't work (in the same way it didn't work in GLM).

Generally, I think we should rediscuss whether we actually want to use JuliaFormatter. Both versions 1 and 2 suffer from long-standing issues (eg generally it is not idempotent) and Runic seems better maintained and of higher quality and with better tooling (eg official GH action). Therefore important parts of the ecosystem (eg Documenter, DifferentiationInterface, all SciML repos, and actually also PDMats and StatsFuns) switched to Runic.

@nalimilan
Copy link
Member Author

Putting the git-ignore-blame-revs in the PR won't work (in the same way it didn't work in GLM).

What do you mean? IIRC you need to configure this manually if you want this to work locally, but GitHub seems to use it by default. For example this file has been changed a lot by the JuliaFormatter commit but it's not shown in blame: https://github.com/JuliaStats/GLM.jl/blame/master/docs/make.jl

Generally, I think we should rediscuss whether we actually want to use JuliaFormatter. Both versions 1 and 2 suffer from long-standing issues (eg generally it is not idempotent) and Runic seems better maintained and of higher quality and with better tooling (eg official GH action). Therefore important parts of the ecosystem (eg Documenter, DifferentiationInterface, all SciML repos, and actually also PDMats and StatsFuns) switched to Runic.

As I said I don't have a strong preference as I haven't used Runic. GitHub support seems equivalent since there's https://github.com/julia-actions/julia-format for JuliaFormatter, right? Conversely, JuliaFormatter is included in the Julia VScode extension so it's easier to use especially for external contributors. Maybe the most important point: looking at the Runic docs, AFAICT it doesn't allow enforcing a maximal line length, so that means we'll still have to take care of that manually. Apparently Runic may implement this feature at some point though there are no concrete plans (fredrikekre/Runic.jl#61).

@devmotion
Copy link
Member

What do you mean?

You have to add the commit that ends up on the master branch, otherwise it won't work. That's what happened in GLM and what I fixed in JuliaStats/GLM.jl#604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants