From 0bdd2ed5776bdb18c4ee81b3381a55305c940bc4 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Tue, 11 Sep 2018 02:05:23 -0700 Subject: Enable frozen string in vestigial files Partially addresses #47424. --- app/models/concerns/project_services_loggable.rb | 2 ++ app/models/hooks/active_hook_filter.rb | 2 ++ app/validators/branch_filter_validator.rb | 2 ++ app/validators/js_regex_validator.rb | 2 ++ changelogs/unreleased/frozen-string-enable-vestigial.yml | 5 +++++ 5 files changed, 13 insertions(+) create mode 100644 changelogs/unreleased/frozen-string-enable-vestigial.yml diff --git a/app/models/concerns/project_services_loggable.rb b/app/models/concerns/project_services_loggable.rb index 248a21f3578..fecd77cdc98 100644 --- a/app/models/concerns/project_services_loggable.rb +++ b/app/models/concerns/project_services_loggable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ProjectServicesLoggable def log_info(message, params = {}) message = build_message(message, params) diff --git a/app/models/hooks/active_hook_filter.rb b/app/models/hooks/active_hook_filter.rb index ea046bea368..283e2d680f4 100644 --- a/app/models/hooks/active_hook_filter.rb +++ b/app/models/hooks/active_hook_filter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ActiveHookFilter def initialize(hook) @hook = hook diff --git a/app/validators/branch_filter_validator.rb b/app/validators/branch_filter_validator.rb index ef482aaaa63..6a0899be850 100644 --- a/app/validators/branch_filter_validator.rb +++ b/app/validators/branch_filter_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # BranchFilterValidator # # Custom validator for branch names. Squishes whitespace and ignores empty diff --git a/app/validators/js_regex_validator.rb b/app/validators/js_regex_validator.rb index a515af7b919..be715967b4a 100644 --- a/app/validators/js_regex_validator.rb +++ b/app/validators/js_regex_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class JsRegexValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) return true if value.blank? diff --git a/changelogs/unreleased/frozen-string-enable-vestigial.yml b/changelogs/unreleased/frozen-string-enable-vestigial.yml new file mode 100644 index 00000000000..55313ff0fcc --- /dev/null +++ b/changelogs/unreleased/frozen-string-enable-vestigial.yml @@ -0,0 +1,5 @@ +--- +title: Enable frozen string in vestigial files +merge_request: +author: gfyoung +type: performance -- cgit v1.2.3