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

Failing my builds if code isn't formatted #739

Closed
falOn-Dev opened this issue Jan 6, 2024 · 3 comments
Closed

Failing my builds if code isn't formatted #739

falOn-Dev opened this issue Jan 6, 2024 · 3 comments

Comments

@falOn-Dev
Copy link

My builds are failing if the code isn't properly formatted, even though I never added a check to the build. I only want it to happen during commits using a precommit hook.

My code is here: https://github.com/Team2537/2024Crescendo

@wakingrufus
Copy link
Collaborator

You likely want to configure the plugin to ignoreFailures:
https://github.com/JLLeitschuh/ktlint-gradle#configuration

@falOn-Dev
Copy link
Author

This is not a solution, as this just disables all checking, I want to be able to check for formatting, I just want it to only be manual, rather than be automatic when building

@wakingrufus
Copy link
Collaborator

This flag set to true will allow the checks to run and reports to generate, but the build to still succeed even if the check finds lint errors. It does not disable checking.

The fact that the check task runs as dependency of gradle build and gradle check is a standard gradle convention. If you wish to not run checks as part of your build, you can run gradle test to just build and test

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