diff --git a/lib/danger_plugin.rb b/lib/danger_plugin.rb
index <HASH>..<HASH> 100755
--- a/lib/danger_plugin.rb
+++ b/lib/danger_plugin.rb
@@ -25,13 +25,17 @@ module Danger
     # @return  [void]
     #
     def lint(files = nil)
-      files_to_lint = files ? Dir.glob(files) : (git.modified_files + git.added_files)
+      files_to_lint = fetch_files_to_lint(files)
 
-      offending_files = rubocop(files_to_lint)
       return if offending_files.empty?
 
       markdown offenses_message(offending_files)
     end
+    
+    def offending_files(files = nil)
+      files_to_lint = fetch_files_to_lint(files)
+      rubocop(files_to_lint)
+    end
 
     private
 
@@ -57,5 +61,9 @@ module Danger
       ).to_s
       message + table.split("\n")[1..-2].join("\n")
     end
+    
+    def fetch_files_to_lint(files = nil)
+      @files_to_lint ||= (files ? Dir.glob(files) : (git.modified_files + git.added_files))
+    end
   end
 end
Add offending_file public method

Added `offending_file` public method to be possible use `github.api` (src.: <URL>) in dangerfile (to add comments via Github API).