JLLeitschuh / ktlint-gradle

A ktlint gradle plugin
MIT License
1.47k stars 162 forks source link

Failing Builds Automatically #741

Closed falOn-Dev closed 10 months ago

falOn-Dev commented 10 months ago

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

This is a duplicate of another issue, as it was closed without a proper solution, to clarify, I still want to be able to manually check if my code is formatted, through bash scripts like git hooks, I just don't want it to fail my builds.

wakingrufus commented 10 months ago

The other issue was https://github.com/JLLeitschuh/ktlint-gradle/issues/739 and the feature I described there, ignoreFailures, will do what you describe: run the checks but not fail the build. Unless you can describe to me how this does not fit your use case, I still consider the question answered.

the way the plugin operates by default is the standard convention for all Gradle check plugins, and Gradle provides many ways to control which tasks run as part of your build, if this default is not what you want (for example -x taskName to skip a task entirely