Closed churowa closed 7 years ago
Hey @churowa.
Thanks for asking!
Currently there's no way to change it. You would have to change your gradle file to achieve that, via the xmlOutput option.
But I think this is something we should have. Maybe a xmlFile
parameter so we'd have something like:
android_lint.xmlFile = "path/of/your/report/file.xml" # overrides default REPORT_FILE value
android_lint.lint
What do you think?
That sounds pretty good! Do you want me to have a shot at it?
For now, I've worked around it by linting through gradle first, then copying my output file to the REPORT_FILE location. Pretty hacky because I end up running lint twice per build, but it gets the job done!
@churowa if you have some time to do it, I would love it!
Let me know in case you need any help.
Cheers!
@barbosa Ok! I've forked the project and am giving it go. Please bear with me, I'm pretty new in rubyland.
So the first thing.. after cloning and installing gems, I ran bundle exec rake spec
as suggested. I see:
6 files inspected, 87 offenses detected
RuboCop failed!
Are these just warnings? Can I ignore these [edit] for now [/edit] ?
Ok, from what I can tell, Rubocop is mainly used for style issues.. so safe to ignore those 'offenses' for now, I suppose. :)
That's correct! Just ignore it for now.
I need to clean it up later 😬
Ok, PR created. Pretty sure I need to add some tests or something though. I'll close this issue for now.
@churowa I done as per your mentioned hack. Still I get error for wrong path. I already have file on that path. Can you brefily explain me, what steps you were followed to achieve this??
Hi @milind-mevada-stl
All you need to do is to pass a value to report_file
, like:
android_lint.report_file = "your/report/file.xml"
android_lint.lint
You can find its definition here. If you still can't make it work, would you mind pasting your sample code here so we can help you? Maybe in another issue so we can discuss it there.
Thanks @barbosa . Now it's working.
This should be included in the README! Cheers!
@anthonymonori I could swear it was already there.
Thanks for the heads up! Just added it.
I notice that the plugin is looking for REPORT_FILE in
"app/build/reports/lint/lint-result.xml"
.But my report file is at app/build/outputs/lint-results*.xml. Is there a way to change where REPORT_FILE points to? I'm getting errors on lint.
Thanks!