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 option to fail the build on formatting violations #2317

Open
RenFraser opened this issue Jun 11, 2024 · 2 comments
Open

Add option to fail the build on formatting violations #2317

RenFraser opened this issue Jun 11, 2024 · 2 comments
Labels
feature-request A feature should be added or improved.

Comments

@RenFraser
Copy link

Hi folks, thanks for the great work on Smithy.

Is there an option to fail the Gradle build on formatting violations? It would be great to be able to be able to set options for the smithyFormat task to fail on violations, if not already an option to do so.

If this isn't an option, is it on the roadmap, or is there existing information that would make implementing it via a PR easier, if this is aligned with the maintainers' vision?

@JordonPhillips
Copy link
Contributor

Do you mean failing if the formatter would apply changes? For example, like black --check for python?

@JordonPhillips JordonPhillips added the response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. label Jun 19, 2024
@RenFraser
Copy link
Author

Yeah, that's right. I'm not familiar with the black formatter sorry, though I have heard of it.
The idea is that instead of formatting on build, it would instead check the formatting of smithy fails and fail the build. That way, formatting could be enforced when the pipeline Gradle build command is run.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. label Jun 20, 2024
@JordonPhillips JordonPhillips added the feature-request A feature should be added or improved. label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants