Skip to content

Commit

Permalink
Added documentation for disabling automatics spotless execution durin…
Browse files Browse the repository at this point in the history
…g a build

Co-authored-by: Nilesh Agarwalla <[email protected]>
  • Loading branch information
StewardHail3433 and BrownGenius authored Jan 9, 2024
1 parent 998b826 commit 81ff13a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ spotless {
}
}

// Disable automatics spotless execution during a build
// By default, spotless is configured to run during a build. This is generally undesirable because we don't want formatting errors to cause build failures and hinder developent, debugging, and testing. We generally want to run and apply the spotless changes prior to committing and/or pushing the code to a source code repository (e.g. git)
if (!('spotlessCheck' in gradle.startParameter.taskNames)) {
spotlessJavaCheck.enabled = false
spotlessGroovyGradleCheck.enabled = false
Expand Down

0 comments on commit 81ff13a

Please sign in to comment.