*Proposal: Improve Code Quality and Collaboration with Spotless Plugin* Hey team! I'd like to sugges...
z
Proposal: Improve Code Quality and Collaboration with Spotless Plugin Hey team! I'd like to suggest adding the Spotless plugin to our project. *Spotless automates code formatting, ensuring consistency and adherence to coding standards. It saves time, reduces code review friction, and eases onboarding for new contributors by providing clear formatting guidelines. With Spotless integrated into our CI/CD pipeline, we can enforce formatting rules and catch issues early. * Other successful open-source projects use Spotless, demonstrating its effectiveness in improving code quality and collaboration. Let's discuss how Spotless can benefit our project and address any concerns or objections. I'm happy to assist with the implementation.
r
Hey @zohra3734 we already use spotless
z
@rp_st Sorry, I did not check supertokens root build.gradle
r
though i must say that the plugin works very weirdly. Depending on whose machine it runs on, it formats the code differently for files that have changed!
z
I never faced this issue .. but the main difference was we had used Google Java Format and we had defined explicitly which version of Spotless we wanna use https://github.com/erzohrakhan/HorseRackParkATM/blob/main/pom.xml I think we can try this configuration which I have used in POM.xml and check out This is the same configuration which we had used for project Iridium (open source )
r
Thanks! Will have a look
z
@rp_st I can help you, if you wanna do these changes
r
Sure! Would be great. Maybe you can make a PR?
z
@rp_st After completing respective changes do you know any scenario where Spotless was failing ; so that we can test it
r
not at the top of my mind. Sorry
z
@rp_st I have made changes for spotless in build.gradle of supertokens-root folder and now I have made some changes in supetokens-core(indentdation changes ) but spotless is not showing an error The command which I have used to check is ./startTestEnv --wait If I make any other mistakes(compiler errors) all those errors show up but Spotless is not coming up Am I missing something to build the core?
r
StartTestingEnv —wait doesn’t run spotless.
There is a pre commit hook check in supertokens core that runs spotless check
z
How can I test it at my level?
r
I think spotless itself has a command to check if the code is linted correctly. I’m not sure what that is