Skip to content
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

Make some method to private because of danger initialization #3

Merged
merged 2 commits into from
May 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions lib/findbugs/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,17 @@ class DangerFindbugs < Plugin
# It fails if `report_file` cannot be found inside current directory.
# @return [void]
#
def report

def report(inline_mode = true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

メソッドが引数を持つと呼び出されなくなるぽい

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return fail(GRADLEW_NOT_FOUND) unless gradlew_exists?
exec_gradle_task
return fail(REPORT_FILE_NOT_FOUND) unless report_file_exist?
send_inline_comment

if inline_mode
send_inline_comment
else
# TODO not implemented
end
end

# A getter for `gradle_module`, returning "app" if value is nil.
Expand All @@ -68,6 +74,8 @@ def report_file
@report_file ||= 'build/reports/findbugs_report.xml'
end

private

# A getter for current updated files
# @return [Array[String]]
def target_files
Expand Down