Merge branch 'even-more-frozen-string-lib' into 'master'
Enable even more frozen string in lib/**/*.rb See merge request gitlab-org/gitlab-ce!22206
This commit is contained in:
commit
3ff2e1bb9d
58 changed files with 123 additions and 4 deletions
|
@ -50,7 +50,8 @@ Style/FrozenStringLiteralComment:
|
|||
- 'danger/**/*'
|
||||
- 'db/**/*'
|
||||
- 'ee/**/*'
|
||||
- 'lib/**/*'
|
||||
- 'lib/gitlab/**/*'
|
||||
- 'lib/tasks/**/*'
|
||||
- 'qa/**/*'
|
||||
- 'rubocop/**/*'
|
||||
- 'scripts/**/*'
|
||||
|
|
5
changelogs/unreleased/even-more-frozen-string-lib.yml
Normal file
5
changelogs/unreleased/even-more-frozen-string-lib.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Enable even more frozen string in lib/**/*.rb
|
||||
merge_request:
|
||||
author: gfyoung
|
||||
type: performance
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails/generators'
|
||||
|
||||
module Rails
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitaly
|
||||
class Server
|
||||
def self.all
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module GoogleApi
|
||||
class Auth
|
||||
attr_reader :access_token, :redirect_uri, :state
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'google/apis/compute_v1'
|
||||
require 'google/apis/container_v1'
|
||||
require 'google/apis/cloudbilling_v1'
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
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'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module JSONWebToken
|
||||
class RSAToken < Token
|
||||
attr_reader :key_file
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module JSONWebToken
|
||||
class Token
|
||||
attr_accessor :issuer, :subject, :audience, :id
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mattermost
|
||||
ClientError = Class.new(Mattermost::Error)
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mattermost
|
||||
class Command < Client
|
||||
def create(params)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mattermost
|
||||
Error = Class.new(StandardError)
|
||||
end
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mattermost
|
||||
class NoSessionError < Mattermost::Error
|
||||
def message
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mattermost
|
||||
class Team < Client
|
||||
# Returns all teams that the current user is a member of
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module MicrosoftTeams
|
||||
class Activity
|
||||
def initialize(title:, subtitle:, text:, image:)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module MicrosoftTeams
|
||||
class Notifier
|
||||
def initialize(webhook)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ObjectStorage
|
||||
#
|
||||
# The DirectUpload c;ass generates a set of presigned URLs
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'omniauth-oauth2'
|
||||
|
||||
module OmniAuth
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'omniauth'
|
||||
require 'jwt'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Peek
|
||||
module Rblineprof
|
||||
module CustomControllerHelpers
|
||||
|
@ -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'>×</span></button>"
|
||||
|
@ -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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Peek
|
||||
module Views
|
||||
class Gitaly < View
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Peek
|
||||
module Views
|
||||
class Host < View
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Rouge
|
||||
module Formatters
|
||||
class HTMLGitlab < Rouge::Formatters::HTML
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# A rouge plugin for CommonMark markdown engine.
|
||||
# Used to highlight code generated by CommonMark.
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module RspecFlaky
|
||||
class Config
|
||||
def self.generate_report?
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module RspecFlaky
|
||||
# This is a wrapper class for RSpec::Core::Example
|
||||
class Example
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module RspecFlaky
|
||||
# This represents a flaky RSpec example and is mainly meant to be saved in a JSON file
|
||||
class FlakyExample < OpenStruct
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'active_support/hash_with_indifferent_access'
|
||||
|
||||
require_relative 'flaky_example'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
|
||||
require_dependency 'rspec_flaky/config'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
require 'time'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class ActiveUsersCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class DatabaseConfigExistsCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class GitConfigCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class GitUserDefaultSSHConfigCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class GitVersionCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class GitlabConfigExistsCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class GitlabConfigUpToDateCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class InitScriptExistsCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class InitScriptUpToDateCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class LogWritableCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class MigrationsAreUpCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class OrphanedGroupMembersCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class ProjectsHaveNamespaceCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class RedisVersionCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class RubyVersionCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class TmpWritableCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class UploadsDirectoryExistsCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class UploadsPathPermissionCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module App
|
||||
class UploadsPathTmpPermissionCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
# Base class for Checks. You must inherit from here
|
||||
# and implement the methods below when necessary
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module Helpers
|
||||
include ::Gitlab::TaskHelpers
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module IncomingEmail
|
||||
class ForemanConfiguredCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module IncomingEmail
|
||||
class ImapAuthenticationCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module IncomingEmail
|
||||
class InitdConfiguredCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module IncomingEmail
|
||||
class MailRoomRunningCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module Orphans
|
||||
class NamespaceCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
module Orphans
|
||||
class RepositoryCheck < SystemCheck::BaseCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SystemCheck
|
||||
# Simple Executor is current default executor for GitLab
|
||||
# It is a simple port from display logic in the old check.rake
|
||||
|
|
Loading…
Reference in a new issue