ktlint-gradle icon indicating copy to clipboard operation
ktlint-gradle copied to clipboard

Add execution time of addKtlintCheck/Format hook

Open trietbui85 opened this issue 5 years ago • 3 comments

Although I can use time addKtlintCheckGitPreCommitHook to print out the execution time of that task, I would like that task should have log of execution time instead. Could you print that info to addKtlintCheckGitPreCommitHook and `addKtlintFormatGitPreCommitHook? Thanks.

trietbui85 avatar Oct 25 '20 07:10 trietbui85

You may want to consider looking into Gradle Build Scans or the Gradle Profiler. I think one or both of these can solve your problem.

JLLeitschuh avatar Oct 27 '20 12:10 JLLeitschuh

@anticafe what is your use-case?

Usually addKtlint*GitPreCommitHook tasks should be executed manually only when developer wants to use git hook.

Tapchicoma avatar Nov 01 '20 13:11 Tapchicoma

@Tapchicoma Sometimes I don't want to run the addKtlint*GitPreCommitHook on Pre-Commit, but run such script in Pre-Push to save time.

trietbui85 avatar Nov 01 '20 15:11 trietbui85