k4zy / danger-findbugs Goto Github PK
View Code? Open in Web Editor NEWFindBugs plugin for Danger
License: MIT License
FindBugs plugin for Danger
License: MIT License
Thank you very much for this great plugin.
I am currently trying to have findbugs results directly used from the already run static code analysis on my CI. So it seems you actually added a feature to skip gradle execution in v0.0.6
Sadly it seems this release is not yet available here: https://rubygems.org/gems/danger-findbugs
As far as I can see Danger fetches the gem from there.
It would be really awesome if you could update the plugin so the new skip_gradle_task
can be used :)
Thanks a lot!
Please, consider adding a support for https://gleclaire.github.io/findbugs-maven-plugin/
๐คฆโโ๏ธ
bundle exec danger plugins lint
[!] Failed
Errors
- Description Markdown - DangerFindbugs (class):
- Above your class you need documentation that covers the scope, and the usage of your plugin.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L4#-L6
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:2
- Examples - DangerFindbugs (class):
- You should include some examples of common use-cases for your plugin.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L8#-L27
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:2
- Description - report (method):
- You should include a description for your method.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L40#-L41
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:13
- Description - target_files (method):
- You should include a description for your method.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L40#-L41
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:32
- Description - exec_gradle_task (method):
- You should include a description for your method.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L40#-L41
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:36
- Description - gradlew_exists? (method):
- You should include a description for your method.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L40#-L41
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:40
- Description - report_file_exist? (method):
- You should include a description for your method.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L40#-L41
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:44
- Description - findbugs_report (method):
- You should include a description for your method.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L40#-L41
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:48
- Description - bug_issues (method):
- You should include a description for your method.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L40#-L41
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:52
- Description - send_inline_comment (method):
- You should include a description for your method.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L40#-L41
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:58
Warnings
- Tags - DangerFindbugs (class):
- This plugin does not include `@tags tag1, tag2` and thus will be harder to find in search.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L30
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:2
- References - DangerFindbugs (class):
- Ideally, you have a reference implementation of your plugin that you can show to people, add `@see org/repo` to have the site auto link it.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L29
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:2
- Return Type - report (method):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:13
- Return Type - target_files (method):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:32
- Return Type - exec_gradle_task (method):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:36
- Return Type - findbugs_report (method):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:48
- Return Type - bug_issues (method):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:52
- Return Type - send_inline_comment (method):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:58
- Return Type - gradle_module= (attribute):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:6
- Return Type - gradle_task= (attribute):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:7
- Return Type - report_file= (attribute):
- If the function has no useful return value, use ` @return [void]` - this will be ignored by documentation generators.
- @see - https://github.com/dbgrandi/danger-prose/blob/v2.0.0/lib/danger_plugin.rb#L46
- /Users/kazuki-yoshida/.ghq/github.com/kazy1991/danger-findbugs/lib/findbugs/plugin.rb:8
Failing due to errors
For some reason the config below breaks for some of our PRs. I'm sure I am missing something but here's my config. Could it be a bug or misconfiguration?
Config:
# FindBugs
findbugs.gradle_task = "app:findbugs" #default: findbugs
findbugs.report_file = "app/build/reports/findbugs/findbugs.xml"
# Send inline comment with danger's warn or fail method
findbugs.report
Error:
[!] Invalid Dangerfile
file: undefined method text
for nil:NilClass
# from Dangerfile:23
# -------------------------------------------
# # Send inline comment with danger's warn or fail method
> findbugs.report
#
# -------------------------------------------
Update:
It seems to fail if there're findbugs violations with the PR and wants to report it.
I try to execute bundle exec rake spec
locally, I had error.
Failures:
1) Danger::DangerFindbugs with Dangerfile Create bug issues
Failure/Error: expect(@my_plugin.bug_issues).not_to be_nil
NoMethodError:
undefined method `bug_issues' for #<Danger::Dangerfile:0x007fd8e5b0f6d8>
# ./vendor/bundle/ruby/2.4.0/gems/danger-5.2.1/lib/danger/danger_core/dangerfile.rb:68:in `method_missing'
# ./vendor/bundle/ruby/2.4.0/gems/danger-5.2.1/lib/danger/plugin_support/plugin.rb:23:in `method_missing'
# ./spec/findbugs_spec.rb:48:in `block (3 levels) in <module:Danger>'
2) Danger::DangerFindbugs with Dangerfile Send inline comments
Failure/Error: expect(@my_plugin.send_inline_comment).not_to be_nil
NoMethodError:
undefined method `send_inline_comment' for #<Danger::Dangerfile:0x007fd8e5937cc0>
# ./vendor/bundle/ruby/2.4.0/gems/danger-5.2.1/lib/danger/danger_core/dangerfile.rb:68:in `method_missing'
# ./vendor/bundle/ruby/2.4.0/gems/danger-5.2.1/lib/danger/plugin_support/plugin.rb:23:in `method_missing'
# ./spec/findbugs_spec.rb:55:in `block (3 levels) in <module:Danger>'
Deprecation Warnings:
Using `any_instance` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /Users/ishikuranoboru/.ghq/github.com/noboru-i/danger-findbugs/spec/findbugs_spec.rb:52:in `block (3 levels) in <module:Danger>'.
If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.
1 deprecation warning total
Finished in 0.11623 seconds (files took 0.51359 seconds to load)
9 examples, 2 failures
I think, https://github.com/kazy1991/danger-findbugs/pull/3/files#diff-cb2124f377a7bb77eca4ecd8a4c0db42R77 changes makes bug_issues
and send_inline_comment
private, So we cannot call these methods by outside.
How about remove these test code?
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.