-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Same output file for every task #33
Comments
should we do it in this PR or a new one? |
@originx I think a new one is better. The changes are not in the method touched by #32. |
I don't personally use the output report. I'd say that we should make the output configurable on the task but keep the default a sane configuration. |
It is a good idea, though checkstyle, for example, doesn't do this. It just aggregates everything in one file. Also this is more Android specific, though Gradle start to introduce SoftwareModel that will allow to have flavors on the plain Kotlin projects. Also this feature should be configurable and disabled by default. |
With the current implementation if you run different tasks the output will be always the same file, and this file will be overwritten every time and not merged automatically. So, currently, you loose the report of all the tasks but the last executed. I don't see what is the benefit of having it disabled by default. It will be useful if you execute different tasks and nothing will change if you only have one beside the name of the file itself. The file is generate only for the tasks that you are actually executing and not for every variant you have. In my example I have dozens of variants but I only run two tasks: ktlintNonpayItalyCompatDebugCheck and ktlintNonpayMexicoCompatDebugCheck. |
OK, I fear I've been misunderstood: I don't want to enable anything new related to the report output, I just want to generate the file name for the output in a different way. To make it more clear I have opened a pull request with my changes. This should have zero impact on non Android builds beside changing the name from reports/ktlint/ktlint.xml to reports/ktlint-reports-main.xml. @Tapchicoma, @JLLeitschuh please have a look and if you have questions just let me know. |
Closed via #22 |
Currently the output of the all the ktlint*Check task is the same XML file:
This means that is not possible to have multiple tasks checking different variants in the same gradle execution (this is really common in CI).
My suggestion is to align the output to the one that Lint is using and generate one file per task:
This way is possible to generate multiple reports with a single gradle execution.
I have already fixed this issue locally, if you want I can open a Pull Request.
The text was updated successfully, but these errors were encountered: