Closed andrewtavis closed 1 month ago
Hi @andrewtavis Can I work on this ?
Yes by all means, @KesharwaniArpita :) Please transfer the pre-commit confirmation file from Scribe-Data, and also try to add the documentation that Scribe-Data has for pre-commit to the readme and contributing files over here. I'll clean up the documentation as needed.
i was about to suggest that 😂
Assigning you both as maybe @MostafaMohamed2002 can support if @KesharwaniArpita has any questions :)
Hi @andrewtavis and @MostafaMohamed2002, I have a question about the adding pre-commits, as Scribe Android mainly uses Java/Kotlin, so wee need to add more relevant linters and formatters, such as ktlint and detekt to the pre-commits? I have already raised the pr to add the file and documentation. Will we need the mentioned linters too?
Hi @andrewtavis and @MostafaMohamed2002, I have a question about the adding pre-commits, as Scribe Android mainly uses Java/Kotlin, so wee need to add more relevant linters and formatters, such as ktlint and detekt to the pre-commits? I have already raised the pr to add the file and documentation. Will we need the mentioned linters too?
Hi @KesharwaniArpita, we already use ktlint and detekt as you see here https://github.com/scribe-org/Scribe-Android/blob/70185902521d79f2a2ab319ec9b38b2849f22b0d/.github/workflows/pr_ktlint_detekt.yaml#L1-L31
so instead of run them when open a pr we need you to make pre-commit hook to run detekt
and ktlint
before any commit .
I recommend you read this article it will definitely help you 😉
Thank you @MostafaMohamed2002
Closed by #219 😊 Thanks so much for the support here, @MostafaMohamed2002! And thanks for the setup and documentation, @KesharwaniArpita :)
Terms
Description
This issue would focus on adding in pre-commit to Scribe-Android such that linting, formatting and other checks could be ran on commit to avoid them being sent to the repo. Directions on how to setup pre-commit would further need to be added to the readme and contributing guide :)
The pre-commit config for this issue can generally be that of Scribe-Data, which can be found here.
Contribution
Would be happy to support or get to this as I can! This would also be a good first issue for someone who has some Python experience or experience setting up pre-commit 😊