[ 
https://issues.apache.org/jira/browse/FINERACT-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17151830#comment-17151830
 ] 

Petri Tuomola commented on FINERACT-1079:
-----------------------------------------

I think something like the below (from one of the articles you linked) would be 
a good idea:

gradle.projectsEvaluated {
 *if* (project.automatedBuild) {
 preBuild.dependsOn(spotlessCheck)
 } *else* {
 preBuild.dependsOn(spotlessApply)
 }
}

That way if you run a build manually, then it does spotlessApply and fixes the 
formatting. Whereas when Travis does a build (assuming we can get Travis to set 
project.automatedBuild) it just does a check - ie ensures that what it gets 
from Github is correctly formatted.  

 

> Run Task spotlessApply before commit (Pre-commit)?
> --------------------------------------------------
>
>                 Key: FINERACT-1079
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1079
>             Project: Apache Fineract
>          Issue Type: Improvement
>            Reporter: Awasum Yannick
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> Developers consistently have problems manually running the spotlessApply task 
> after coding changes... See: [https://github.com/apache/fineract/pull/1151] 
> and [https://github.com/apache/fineract/pull/1148]
> maybe we should just run spotlessApply just before compilation and skip the 
> tasks to check for spotless failures? Or we run both of them: Run 
> spotlessApply before spotlessCheck (seems wasteful). Is this a good idea? I 
> wonder?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to