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

rubocop_inline_disable_suggestion.rb « danger « tooling - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4d1bff9856b0899bc54a00344b47245f4e305a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require_relative 'suggestion'

module Tooling
  module Danger
    class RubocopInlineDisableSuggestion < Suggestion
      MATCH = /^\+.*#\s*rubocop\s*:\s*(?:disable|todo)\s+/
      REPLACEMENT = nil

      SUGGESTION = <<~MESSAGE_MARKDOWN
        Consider removing this inline disabling and adhering to the rubocop rule.
        If that isn't possible, please provide context as a reply for reviewers.
        See [rubocop best practices](https://docs.gitlab.com/ee/development/rubocop_development_guide.html).

        ----

        [Improve this message](https://gitlab.com/gitlab-org/gitlab/-/blob/master/tooling/danger/rubocop_inline_disable_suggestion.rb)
        or [have feedback](https://gitlab.com/gitlab-org/gitlab/-/issues/428157)?
      MESSAGE_MARKDOWN
    end
  end
end