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

Add a convenience script for consistent astyle formatting #1861

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

SWilson4
Copy link
Member

The behaviour of astyle varies across versions and platforms, which means it can sometimes be a pain to get PRs to pass CI formatting checks. This PR adds a convenience script which runs astyle over local code in the CI Docker image, ensuring that local formatting matches what's expected by CI.

My hope is that this script will reduce friction for new contributors and busywork for regular ones. I've been using this approach for a while myself.

  • Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)
  • Does this PR change the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API? (If so, PRs in fully supported downstream projects dependent on these, i.e., oqs-provider will also need to be ready for review and merge by the time this is merged.)

Signed-off-by: Spencer Wilson <[email protected]>
Signed-off-by: Spencer Wilson <[email protected]>
Copy link
Member

@baentsch baentsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very sensible improvement for any current and new contributor, Thanks @SWilson4 !

Re-reading the CONTRIBUTING.md file also gave me thought for some more improvements...

@SWilson4 SWilson4 merged commit 45972ea into main Jul 26, 2024
4 checks passed
@SWilson4 SWilson4 deleted the sw-format-script branch July 26, 2024 12:39
rtjk pushed a commit to rtjk/liboqs that referenced this pull request Aug 5, 2024
…um-safe#1861)

* Add script to format code in a CI container

* Update CONTRIBUTING.md to document script
---------

Signed-off-by: Spencer Wilson <[email protected]>
Signed-off-by: rtjk <[email protected]>
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