JuliaBesties / BestieTemplate.jl

Template for Julia Programming Language packages using the copier engine.
http://JuliaBesties.github.io/BestieTemplate.jl/
Mozilla Public License 2.0
43 stars 9 forks source link

Support styleguides #424

Open lucaferranti opened 1 month ago

lucaferranti commented 1 month ago

Description

It would be nice to have a question like

> Would you like to follow any particular styleguide?
- SciML style
- blue style
- YAS style
- None

If the user selects a styleguide, then the corresponding badge should be added to the README.md and the .JuliaFormatter.toml should have a line

style = "$STYLENAME"

Maybe one thing worth pointing out is that all three styles above choose a formatting of 4, hence not sure how the choice should play with the question about indentation. I think a .JuliaFormatter.toml file like

style = "sciml"
indentation = 2

is valid and indentation would overwrite the value dictated by style (haven't checked), hence I guess there's no harm in keeping the indentation question if one wants

Validation and testing

It would need to verify the badge is inserted and .JuliaFormatter has the approrpriate style entry in the generated package.

Motivation

As those styleguides are popular (at least scimlstyle and blue, not sure about yas) several package developers may want to follow those and add the badge to the readme. This is also a feature of PkgTemplates.jl hence it would fit nicely under #353

Target audience

No response

Can you help?

Yes, I can open a PR. This way I can also guineapig the instructions in https://abelsiqueira.com/BestieTemplate.jl/stable/91-developer/#Additions-to-the-templates to check if they're clear :D

abelsiqueira commented 1 month ago

I like the idea. Feel free to open a PR. It should fit inside the copier/code-quality.yml file, I think.