Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-13 21:11:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-13 21:11:49 +0300
commit718637f88ce9933f581c58e27dfffc389cbb6111 (patch)
treeab46e3b90bff9842387639ff849bfeee9c5e63a3 /danger
parentb0b94ea6e54f824d02840912f7086e9f47350571 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r--danger/plugins/rubocop.rb12
-rw-r--r--danger/rubocop/Dangerfile5
2 files changed, 17 insertions, 0 deletions
diff --git a/danger/plugins/rubocop.rb b/danger/plugins/rubocop.rb
new file mode 100644
index 00000000000..6645a37041b
--- /dev/null
+++ b/danger/plugins/rubocop.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require_relative '../../tooling/danger/rubocop_inline_disable_suggestion'
+
+module Danger
+ class Rubocop < ::Danger::Plugin
+ # Put the helper code somewhere it can be tested
+ def add_suggestions_for(filename)
+ Tooling::Danger::RubocopInlineDisableSuggestion.new(filename, context: self).suggest
+ end
+ end
+end
diff --git a/danger/rubocop/Dangerfile b/danger/rubocop/Dangerfile
new file mode 100644
index 00000000000..a53847199db
--- /dev/null
+++ b/danger/rubocop/Dangerfile
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+helper.all_changed_files.each do |filename|
+ rubocop.add_suggestions_for(filename)
+end