diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 03:07:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 03:07:13 +0300 |
commit | a94adeb6b2b212e824d1bbce5da16ecd7d1b5a20 (patch) | |
tree | 6d5be7275e6f5aec9888758b81318cb8648c3c17 /rubocop | |
parent | 355a4a17ebbeb246e48954462163577ae77f45c0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/gitlab/doc_url.rb | 2 | ||||
-rw-r--r-- | rubocop/cop/gitlab/finder_with_find_by.rb | 2 | ||||
-rw-r--r-- | rubocop/cop/inject_enterprise_edition_module.rb | 2 | ||||
-rw-r--r-- | rubocop/cop/project_path_helper.rb | 2 | ||||
-rw-r--r-- | rubocop/cop/qa/selector_usage.rb | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/rubocop/cop/gitlab/doc_url.rb b/rubocop/cop/gitlab/doc_url.rb index cbfbdf7eb57..41a1c2f8b36 100644 --- a/rubocop/cop/gitlab/doc_url.rb +++ b/rubocop/cop/gitlab/doc_url.rb @@ -21,7 +21,7 @@ module RuboCop MSG = 'Use `#help_page_url` instead of directly including link. ' \ 'See https://docs.gitlab.com/ee/development/documentation/#linking-to-help-in-ruby.' - DOCS_URL_REGEXP = %r{https://docs.gitlab.com/ee/[\w#%./-]+}.freeze + DOCS_URL_REGEXP = %r{https://docs.gitlab.com/ee/[\w#%./-]+} def on_str(node) match = DOCS_URL_REGEXP.match(node.source) diff --git a/rubocop/cop/gitlab/finder_with_find_by.rb b/rubocop/cop/gitlab/finder_with_find_by.rb index ac454398f9c..e6d190e4476 100644 --- a/rubocop/cop/gitlab/finder_with_find_by.rb +++ b/rubocop/cop/gitlab/finder_with_find_by.rb @@ -6,7 +6,7 @@ module RuboCop class FinderWithFindBy < RuboCop::Cop::Base extend RuboCop::Cop::AutoCorrector - FIND_PATTERN = /\Afind(_by!?)?\z/.freeze + FIND_PATTERN = /\Afind(_by!?)?\z/ ALLOWED_MODULES = ['FinderMethods'].freeze def message(used_method) diff --git a/rubocop/cop/inject_enterprise_edition_module.rb b/rubocop/cop/inject_enterprise_edition_module.rb index 333af10d82f..24b679e092d 100644 --- a/rubocop/cop/inject_enterprise_edition_module.rb +++ b/rubocop/cop/inject_enterprise_edition_module.rb @@ -20,7 +20,7 @@ module RuboCop DISALLOW_METHODS = Set.new(%i[include extend prepend]).freeze - COMMENT_OR_EMPTY_LINE = /^\s*(#.*|$)/.freeze + COMMENT_OR_EMPTY_LINE = /^\s*(#.*|$)/ CHECK_LINE_METHODS_REGEXP = Regexp.union((CHECK_LINE_METHODS + DISALLOW_METHODS).map(&:to_s) + [COMMENT_OR_EMPTY_LINE]).freeze diff --git a/rubocop/cop/project_path_helper.rb b/rubocop/cop/project_path_helper.rb index f053c9a01b7..fdf452ccbae 100644 --- a/rubocop/cop/project_path_helper.rb +++ b/rubocop/cop/project_path_helper.rb @@ -9,7 +9,7 @@ module RuboCop '`foo_project_bar_path(project, bar)` instead of ' \ '`foo_namespace_project_bar_path(project.namespace, project, bar)`.' - METHOD_NAME_PATTERN = /\A([a-z_]+_)?namespace_project(?:_[a-z_]+)?_(?:url|path)\z/.freeze + METHOD_NAME_PATTERN = /\A([a-z_]+_)?namespace_project(?:_[a-z_]+)?_(?:url|path)\z/ def on_send(node) return unless METHOD_NAME_PATTERN.match?(method_name(node).to_s) diff --git a/rubocop/cop/qa/selector_usage.rb b/rubocop/cop/qa/selector_usage.rb index c17f642bd06..331c2c8a18b 100644 --- a/rubocop/cop/qa/selector_usage.rb +++ b/rubocop/cop/qa/selector_usage.rb @@ -20,7 +20,7 @@ module RuboCop include QAHelpers include CodeReuseHelpers - SELECTORS = /\.qa-\w+|data-qa-\w+/.freeze + SELECTORS = /\.qa-\w+|data-qa-\w+/ MESSAGE = %(Do not use `%s` as this is reserved for the end-to-end specs. Use a different selector or a data-testid instead.) def on_str(node) |