Skip to content
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

enforce code style via GitHub actions? #349

Open
achubaty opened this issue Aug 4, 2023 · 5 comments
Open

enforce code style via GitHub actions? #349

achubaty opened this issue Aug 4, 2023 · 5 comments

Comments

@achubaty
Copy link
Collaborator

achubaty commented Aug 4, 2023

See https://github.com/r-lib/actions/blob/v2-branch/examples/style.yaml for an action we can use to auto-style package code and commit the changes.

I think it's worth implementing across our packages to 1) help my brain read/understand code more easily , and 2) facilitate contributions etc. from others, especially new contributors.

@eliotmcintire if you agree, I'll create PR.

@eliotmcintire
Copy link
Contributor

I think this should wait until all our CRAN-intended packages are successfully on CRAN. We don't have the people power to deal with such a change now. We must get SpaDES.tools and NetLogoR updated on CRAN first.

@achubaty
Copy link
Collaborator Author

achubaty commented Aug 4, 2023

this is an extremely simple addition to our GHA workflows, to automatically runs the styler::style_pkg() command after each push/PR and commit the changes.

no additional person power required.

@eliotmcintire
Copy link
Contributor

But it will add work now to get all our code to pass, no?

@achubaty
Copy link
Collaborator Author

achubaty commented Aug 4, 2023

there's nothing to 'pass' - these aren't extra checks, this is automatically applying code styling to the package.

@eliotmcintire
Copy link
Contributor

I guess it seems like something that I don't need right now. Can we hold off? Until after all packages are on CRAN with their updates? I will have to adapt to code being changed while I am working in it and I don't have the time to learn this right now.

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

No branches or pull requests

2 participants