Skip to content
Snippets Groups Projects
Commit c8755543 authored by gfyoung's avatar gfyoung
Browse files

Enable even more frozen string in lib/**/*.rb

Enables frozen string for the following files:

* lib/generators/**/*.rb
* lib/gitaly/**/*.rb
* lib/google_api/**/*.rb
* lib/haml_lint/**/*.rb
* lib/json_web_token/**/*.rb
* lib/mattermost/**/*.rb
* lib/microsoft_teams/**/*.rb
* lib/object_storage/**/*.rb
* lib/omni_auth/**/*.rb
* lib/peek/**/*.rb
* lib/rouge/**/*.rb
* lib/rspec_flaky/**/*.rb
* lib/system_check/**/*.rb

Partially addresses #47424.
parent 1540d51a
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Showing
with 47 additions and 4 deletions
Loading
Loading
@@ -48,7 +48,8 @@ Style/FrozenStringLiteralComment:
- 'danger/**/*'
- 'db/**/*'
- 'ee/**/*'
- 'lib/**/*'
- 'lib/gitlab/**/*'
- 'lib/tasks/**/*'
- 'qa/**/*'
- 'rubocop/**/*'
- 'scripts/**/*'
Loading
Loading
---
title: Enable even more frozen string in lib/**/*.rb
merge_request:
author: gfyoung
type: performance
# frozen_string_literal: true
require 'rails/generators'
 
module Rails
Loading
Loading
# frozen_string_literal: true
module Gitaly
class Server
def self.all
Loading
Loading
# frozen_string_literal: true
module GoogleApi
class Auth
attr_reader :access_token, :redirect_uri, :state
Loading
Loading
# frozen_string_literal: true
require 'google/apis/compute_v1'
require 'google/apis/container_v1'
require 'google/apis/cloudbilling_v1'
Loading
Loading
unless Rails.env.production? # rubocop:disable Naming/FileName
# rubocop:disable Naming/FileName
# frozen_string_literal: true
unless Rails.env.production?
require 'haml_lint/haml_visitor'
require 'haml_lint/linter'
require 'haml_lint/linter_registry'
Loading
Loading
# frozen_string_literal: true
module JSONWebToken
class RSAToken < Token
attr_reader :key_file
Loading
Loading
# frozen_string_literal: true
module JSONWebToken
class Token
attr_accessor :issuer, :subject, :audience, :id
Loading
Loading
# frozen_string_literal: true
module Mattermost
ClientError = Class.new(Mattermost::Error)
 
Loading
Loading
# frozen_string_literal: true
module Mattermost
class Command < Client
def create(params)
Loading
Loading
# frozen_string_literal: true
module Mattermost
Error = Class.new(StandardError)
end
# frozen_string_literal: true
module Mattermost
class NoSessionError < Mattermost::Error
def message
Loading
Loading
# frozen_string_literal: true
module Mattermost
class Team < Client
# Returns all teams that the current user is a member of
Loading
Loading
# frozen_string_literal: true
module MicrosoftTeams
class Activity
def initialize(title:, subtitle:, text:, image:)
Loading
Loading
# frozen_string_literal: true
module MicrosoftTeams
class Notifier
def initialize(webhook)
Loading
Loading
# frozen_string_literal: true
module ObjectStorage
#
# The DirectUpload c;ass generates a set of presigned URLs
Loading
Loading
# frozen_string_literal: true
require 'omniauth-oauth2'
 
module OmniAuth
Loading
Loading
# frozen_string_literal: true
require 'omniauth'
require 'jwt'
 
Loading
Loading
# frozen_string_literal: true
module Peek
module Rblineprof
module CustomControllerHelpers
Loading
Loading
@@ -41,7 +43,7 @@ module Peek
]
end.sort_by{ |a,b,c,d,e,f| -f }
 
output = "<div class='modal-dialog modal-xl'><div class='modal-content'>"
output = ["<div class='modal-dialog modal-xl'><div class='modal-content'>"]
output << "<div class='modal-header'>"
output << "<h4>Line profiling: #{human_description(params[:lineprofiler])}</h4>"
output << "<button class='close' type='button' data-dismiss='modal' aria-label='close'><span aria-hidden='true'>&times;</span></button>"
Loading
Loading
@@ -93,7 +95,7 @@ module Peek
 
output << "</div></div></div>"
 
response.body += "<div class='modal' id='modal-peek-line-profile' tabindex=-1>#{output}</div>".html_safe
response.body += "<div class='modal' id='modal-peek-line-profile' tabindex=-1>#{output.join}</div>".html_safe
end
 
ret
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment