fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] awasum commented on pull request #1155: FINERACT-1079: Run spotlessApply before compileJava task
Date Mon, 06 Jul 2020 05:37:12 GMT

awasum commented on pull request #1155:
URL: https://github.com/apache/fineract/pull/1155#issuecomment-654024763


   > @awasum @xurror @thesmallstar @vorburger Just one concern: doesn't this mean that
you can then check in code that doesn't pass the Spotless formatting standards, and get that
to pass the build anyway?
   > 
   > In other words: if I now commit code that is completely wrongly formatted, when Travis
runs the build, it does spotlessApply so the build passes - but the **fixed code is never
committed into Github**: so if I look at the source code on Github (or clone/branch the repository),
it is still incorrectly formatted?
   > 
   > This to me would seem to defeat the whole purpose of Spotless: it should ensure that
the code in Github is correctly formatted, not that the code that is compiled is formatted
correctly. The compiler doesn't care about code formatting...
   > 
   > Also this means that the code everyone is running is actually different from what
is checked into Github. So if you e.g. look at a stack trace from someone's build and compare
the line numbers with source in Github - then the line numbers will not match, as spotlessApply
may have changed them. Also this means that any source code you write is automatically modified
by spotless without you getting a chance to review whether the changes are correct.
   > 
   > Unless I'm missing something here, then this does not sound like a good idea to me...
   
   @ptuomola ..I now see this as a problem than a solution. Thank you very much for catching
this. I did not see all the edge cases and frankly should have put this as draft. I am not
reverting this for us to look for a better solution. We should be looking for something like
this: https://cwiki.apache.org/confluence/display/BEAM/Spotless+pre-commit
   https://medium.com/@aruny3/improve-code-formatting-on-every-commit-7fbb0cdfdab6
   https://github.com/diffplug/spotless/issues/178


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message