loadsmart / danger-android_lint Goto Github PK
View Code? Open in Web Editor NEWA Danger plugin for Android Lint
Home Page: https://developer.android.com/studio/write/lint.html
License: MIT License
A Danger plugin for Android Lint
Home Page: https://developer.android.com/studio/write/lint.html
License: MIT License
Hi,
I have a large multi module project where we perform the lint analysis on a different CI step. can an option be added to parse multiple lint files instead of just 1?
Using gradle 4.6
, gradle build tools 3.2.1
and a target SDK of 28
no lint report is created, if there are no issues found. (tobiasschuerg/FittedDrawable#2)
...
:library:lint
Ran lint on variant release: 0 issues found
Ran lint on variant debug: 0 issues found
and thus, Danger fails:
BUILD SUCCESSFUL in 17s
56 actionable tasks: 2 executed, 54 up-to-date
[!] The exception involves the following plugins:
- danger-android_lint
bundler: failed to load command: danger (/usr/local/bin/danger)
Danger::DSLError:
[!] Invalid `Dangerfile` file: No such file or directory @ rb_sysopen - file:///bitrise/src/library/build/reports/lint-results.xml
# from Dangerfile:20
# -------------------------------------------
# android_lint.report_file = "file:///bitrise/src/library/build/reports/lint-results.xml"
> android_lint.lint(inline_mode: true)
# android_lint.lint
# -------------------------------------------
If issues are found, the report is generated and everything works fine.
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!
My Dangerfile
android_lint.gradle_task = 'checkstyle'
android_lint.report_file = 'app/build/reports/checkstyle/checkstyle.xml'
android_lint.lint(inline_mode: true)
The violations are detected by linting, but the messages are not posted to the github repo.
here is the config:
android_lint.skip_gradle_task = true
android_lint.report_file = "./app/build/reports/lint/lint-report.xml"
android_lint.filtering = true
android_lint.lint(inline_mode: true)
Danger report every issues in the PR
I use gitlab
How filtering should work ?
Using android_lint.lint(inline_mode: true)
reports all issues in a single table in a comment. Is there some verbose logging I can turn on to debug this?
I would like to run Danger form a directory one level up form my android project. Is there anyway to tell danger android lint where the android project is, so it can find gradlew?
I can move the Dangerfile into the android project but I then get a ruby-git error - something like ArgumentError exception claiming the path does not exists
Similar sort of problem as danger/danger#219
I'm getting the following error:
invalid byte sequence in US-ASCII
/usr/local/bundle/gems/oga-2.10/lib/oga/xml/entities.rb:74:in `gsub'
/usr/local/bundle/gems/oga-2.10/lib/oga/xml/entities.rb:74:in `decode'
/usr/local/bundle/gems/oga-2.10/lib/oga/entity_decoder.rb:14:in `decode'
/usr/local/bundle/gems/oga-2.10/lib/oga/entity_decoder.rb:5:in `try_decode'
/usr/local/bundle/gems/oga-2.10/lib/oga/xml/attribute.rb:71:in `value'
/usr/local/bundle/gems/oga-2.10/lib/oga/xml/element.rb:91:in `get'
/usr/local/bundle/gems/danger-android_lint-0.0.4/lib/android_lint/plugin.rb:144:in `block in parse_results'
/usr/local/bundle/gems/danger-android_lint-0.0.4/lib/android_lint/plugin.rb:139:in `each'
/usr/local/bundle/gems/danger-android_lint-0.0.4/lib/android_lint/plugin.rb:139:in `parse_results'
/usr/local/bundle/gems/danger-android_lint-0.0.4/lib/android_lint/plugin.rb:125:in `block in message_for_issues'
/usr/local/bundle/gems/danger-android_lint-0.0.4/lib/android_lint/plugin.rb:123:in `each'
/usr/local/bundle/gems/danger-android_lint-0.0.4/lib/android_lint/plugin.rb:123:in `message_for_issues'
/usr/local/bundle/gems/danger-android_lint-0.0.4/lib/android_lint/plugin.rb:88:in `lint'
Dangerfile:11:in `block in parse'
/usr/local/bundle/gems/danger-5.4.0/lib/danger/danger_core/dangerfile.rb:199:in `eval'
/usr/local/bundle/gems/danger-5.4.0/lib/danger/danger_core/dangerfile.rb:199:in `block in parse'
/usr/local/bundle/gems/danger-5.4.0/lib/danger/danger_core/dangerfile.rb:195:in `instance_eval'
/usr/local/bundle/gems/danger-5.4.0/lib/danger/danger_core/dangerfile.rb:195:in `parse'
/usr/local/bundle/gems/danger-5.4.0/lib/danger/danger_core/dangerfile.rb:272:in `run'
/usr/local/bundle/gems/danger-5.4.0/lib/danger/danger_core/executor.rb:27:in `run'
/usr/local/bundle/gems/danger-5.4.0/lib/danger/commands/runner.rb:66:in `run'
/usr/local/bundle/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/bundle/gems/danger-5.4.0/bin/danger:5:in `<top (required)>'
/usr/local/bundle/bin/danger:17:in `load'
/usr/local/bundle/bin/danger:17:in `<top (required)>'
The generated XML is valid (but really large ~1.4MB, I don't know if that can be an issue).
Idea is from LeakCanary square/leakcanary#1839.
Shall we have a guestbook here as well to write nice things about this plugin?
exists
method not found in ruby version 3.0+
android_lint/plugin.rb:113:in lint': undefined method
exists?' for File:Class (NoMethodError)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.