repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/json_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/json_formatter.rb | # frozen_string_literal: true
require 'json'
require 'pathname'
module RuboCop
module Formatter
# This formatter formats the report data in JSON format.
class JSONFormatter < BaseFormatter
include PathUtil
attr_reader :output_hash
def initialize(output, options = {})
super
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/text_util.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/text_util.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# Common logic for UI texts.
module TextUtil
module_function
def pluralize(number, thing, options = {})
if number.zero? && options[:no_for_zero]
"no #{thing}s"
elsif number == 1
"1 #{thing}"
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/fuubar_style_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/fuubar_style_formatter.rb | # frozen_string_literal: true
require 'ruby-progressbar'
module RuboCop
module Formatter
# This formatter displays a progress bar and shows details of offenses as
# soon as they are detected.
# This is inspired by the Fuubar formatter for RSpec by Jeff Kreeftmeijer.
# https://github.com/jeffkreeftme... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/clang_style_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/clang_style_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# This formatter formats report data in clang style.
# The precise location of the problem is shown together with the
# relevant source code.
class ClangStyleFormatter < SimpleTextFormatter
ELLIPSES = '...'
def report_file(fil... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/formatter_set.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/formatter_set.rb | # frozen_string_literal: true
require 'fileutils'
module RuboCop
module Formatter
# This is a collection of formatters. A FormatterSet can hold multiple
# formatter instances and provides transparent formatter API methods
# which invoke same method of each formatters.
class FormatterSet < Array
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/emacs_style_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/emacs_style_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# This formatter displays the report data in format that's
# easy to process in the Emacs text editor.
# The output is machine-parsable.
class EmacsStyleFormatter < BaseFormatter
def file_finished(file, offenses)
offenses.eac... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/worst_offenders_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/worst_offenders_formatter.rb | # frozen_string_literal: true
require 'pathname'
module RuboCop
module Formatter
# This formatter displays the list of offensive files, sorted by number of
# offenses with the worst offenders first.
#
# Here's the format:
#
# 26 this/file/is/really/bad.rb
# 3 just/ok.rb
# --
#... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/html_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/html_formatter.rb | # frozen_string_literal: true
require 'cgi'
require 'erb'
require 'ostruct'
require 'base64'
require_relative 'text_util'
module RuboCop
module Formatter
# This formatter saves the output as an html file.
class HTMLFormatter < BaseFormatter
ELLIPSES = '<span class="extra-code">...</span>'
TEMPLA... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/colorizable.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/colorizable.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# This mix-in module provides string coloring methods for terminals.
# It automatically disables coloring if coloring is disabled in the process
# globally or the formatter's output is not a terminal.
module Colorizable
def rainbow
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/auto_gen_config_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/auto_gen_config_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# Does not show individual offenses in the console.
class AutoGenConfigFormatter < ProgressFormatter
def finished(inspected_files)
output.puts
report_summary(inspected_files.size,
@total_offense_count,... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/quiet_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/quiet_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# If no offenses are found, no output is displayed.
# Otherwise, SimpleTextFormatter's output is displayed.
class QuietFormatter < SimpleTextFormatter
def report_summary(file_count, offense_count, correction_count, correctable_count)
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/base_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/base_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# Abstract base class for formatter, implements all public API methods.
#
# ## Creating Custom Formatter
#
# You can create a custom formatter by subclassing
# `RuboCop::Formatter::BaseFormatter` and overriding some methods
# o... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/junit_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/junit_formatter.rb | # frozen_string_literal: true
require 'rexml/document'
#
# This code is based on https://github.com/mikian/rubocop-junit-formatter.
#
# Copyright (c) 2015 Mikko Kokkonen
#
# MIT License
#
# https://github.com/mikian/rubocop-junit-formatter/blob/master/LICENSE.txt
#
module RuboCop
module Formatter
# This formatt... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/progress_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/progress_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# This formatter display dots for files with no offenses and
# letters for files with problems in the them. In the end it
# appends the regular report data in the clang style format.
class ProgressFormatter < ClangStyleFormatter
incl... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/pacman_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/pacman_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# This formatter prints a PACDOT per every file to be analyzed.
# Pacman will "eat" one PACDOT per file when no offense is detected.
# Otherwise it will print a Ghost.
# This is inspired by the Pacman formatter for RSpec by Carlos Rojas.
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/offense_count_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/offense_count_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# This formatter displays the list of offended cops with a count of how
# many offenses of their kind were found. Ordered by desc offense count
#
# Here's the format:
#
# 26 LineLength
# 3 OneLineConditional
# --
# 2... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/simple_text_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/simple_text_formatter.rb | # frozen_string_literal: true
require_relative 'colorizable'
require_relative 'text_util'
module RuboCop
module Formatter
# A basic formatter that displays only files with offenses.
# Offenses are displayed at compact form - just the
# location of the problem and the associated message.
class Simple... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/tap_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/tap_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# This formatter formats report data using the Test Anything Protocol.
# TAP allows for to communicate tests results in a language agnostics way.
class TapFormatter < ClangStyleFormatter
def started(target_files)
super
@p... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/disabled_config_formatter.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/formatter/disabled_config_formatter.rb | # frozen_string_literal: true
module RuboCop
module Formatter
# This formatter displays a YAML configuration file where all cops that
# detected any offenses are configured to not detect the offense.
class DisabledConfigFormatter < BaseFormatter
HEADING = <<~COMMENTS
# This configuration wa... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/core_ext/string.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/core_ext/string.rb | # frozen_string_literal: true
# Extensions to the core String class
class String
unless method_defined?(:blank?) && ' '.blank?
# Checks whether a string is blank. A string is considered blank if it
# is either empty or contains only whitespace characters.
#
# @return [Boolean] true is the string is b... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/ext/regexp_node.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/ext/regexp_node.rb | # frozen_string_literal: true
module RuboCop
module Ext
# Extensions to AST::RegexpNode for our cached parsed regexp info
module RegexpNode
ANY = Object.new
def ANY.==(_)
true
end
private_constant :ANY
class << self
attr_reader :parsed_cache
end
@par... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/ext/processed_source.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/ext/processed_source.rb | # frozen_string_literal: true
module RuboCop
module Ext
# Extensions to AST::ProcessedSource for our cached comment_config
module ProcessedSource
def comment_config
@comment_config ||= CommentConfig.new(self)
end
def disabled_line_ranges
comment_config.cop_disabled_line_ran... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/severity.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/severity.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Severity class is simple value object about severity
class Severity
include Comparable
NAMES = %i[refactor convention warning error fatal].freeze
# @api private
CODE_TABLE = { R: :refactor, C: :convention,
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/cop.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/cop.rb | # frozen_string_literal: true
require 'uri'
require_relative 'legacy/corrections_proxy'
module RuboCop
module Cop
# @deprecated Use Cop::Base instead
# Legacy scaffold for Cops.
# See https://docs.rubocop.org/rubocop/cop_api_v1_changelog.html
class Cop < Base
attr_reader :offenses
exclu... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/corrector.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/corrector.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This class takes a source buffer and rewrite its source
# based on the different correction rules supplied.
#
# Important!
# The nodes modified by the corrections should be part of the
# AST of the source_buffer.
class Corrector < ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This force provides a way to track local variables and scopes of Ruby.
# Cops interact with this force need to override some of the hook methods.
#
# def before_entering_scope(scope, variable_table)
# end
#
# def after_... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/force.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/force.rb | # frozen_string_literal: true
module RuboCop
module Cop
# A scaffold for concrete forces.
class Force
attr_reader :cops
def self.all
@all ||= []
end
def self.inherited(subclass)
super
all << subclass
end
def self.force_name
name.split('::... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/autocorrect_logic.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/autocorrect_logic.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This module encapsulates the logic for autocorrect behavior for a cop.
module AutocorrectLogic
def autocorrect?
autocorrect_requested? && correctable? && autocorrect_enabled?
end
def autocorrect_requested?
@options.f... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/offense.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/offense.rb | # frozen_string_literal: true
module RuboCop
module Cop
# An offense represents a style violation detected by RuboCop.
class Offense
include Comparable
# @api private
COMPARISON_ATTRIBUTES = %i[line column cop_name
message severity].freeze
# @api pub... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/message_annotator.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/message_annotator.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Message Annotator class annotates a basic offense message
# based on params passed into initializer.
#
# @see #initialize
#
# @example
# RuboCop::Cop::MessageAnnotator.new(
# config, cop_name, cop_config, @options
# ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/ignored_node.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/ignored_node.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Handles adding and checking ignored nodes.
module IgnoredNode
def ignore_node(node)
ignored_nodes << node
end
def part_of_ignored_node?(node)
ignored_nodes.map(&:loc).any? do |ignored_loc|
next false if ign... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/documentation.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/documentation.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Helpers for builtin documentation
module Documentation
module_function
# @api private
def department_to_basename(department)
"cops_#{department.downcase}"
end
# @api private
def url_for(cop_class)
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/registry.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/registry.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Error raised when an unqualified cop name is used that could
# refer to two or more cops under different departments
class AmbiguousCopName < RuboCop::Error
MSG = 'Ambiguous cop name `%<name>s` used in %<origin>s needs ' \
'depar... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/badge.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/badge.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Identifier of all cops containing a department and cop name.
#
# All cops are identified by their badge. For example, the badge for
# `RuboCop::Cop::Layout::IndentationStyle` is `Layout/IndentationStyle`.
# Badges can be parsed as either `... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/base.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/base.rb | # frozen_string_literal: true
module RuboCop
module Cop
# A scaffold for concrete cops.
#
# The Cop::Base class is meant to be extended.
#
# Cops track offenses and can autocorrect them on the fly.
#
# A commissioner object is responsible for traversing the AST and invoking
# the spec... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/internal_affairs.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/internal_affairs.rb | # frozen_string_literal: true
require_relative 'internal_affairs/method_name_equal'
require_relative 'internal_affairs/node_destructuring'
require_relative 'internal_affairs/node_type_predicate'
require_relative 'internal_affairs/offense_location_keyword'
require_relative 'internal_affairs/redundant_message_argument'
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/generator.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/generator.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Source and spec generator for new cops
#
# This generator will take a cop name and generate a source file
# and spec file when given a valid qualified cop name.
# @api private
class Generator
# Note: RDoc 5.1.0 or lower has the f... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/commissioner.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/commissioner.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Commissioner class is responsible for processing the AST and delegating
# work to the specified cops.
class Commissioner
include RuboCop::AST::Traversal
RESTRICTED_CALLBACKS = %i[on_send on_csend].freeze
private_constant :RESTRI... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/team.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/team.rb | # frozen_string_literal: true
module RuboCop
module Cop
# A group of cops, ready to be called on duty to inspect files.
# Team is responsible for selecting only relevant cops to be sent on duty,
# as well as insuring that the needed forces are sent along with them.
#
# For performance reasons, Te... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/util.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/util.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This module contains a collection of useful utility methods.
module Util
include PathUtil
# Match literal regex characters, not including anchors, character
# classes, alternatives, groups, repetitions, references, etc
LITERAL... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/useless_assignment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/useless_assignment.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for every useless assignment to local variable in every
# scope.
# The basic idea for this cop was from the warning of `ruby -cw`:
#
# assigned but unused variable - foo
#
# Currently... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/to_json.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/to_json.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks to make sure `#to_json` includes an optional argument.
# When overriding `#to_json`, callers may invoke JSON
# generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows
# for an optional ar... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/hash_compare_by_identity.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/hash_compare_by_identity.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# Prefer using `Hash#compare_by_identity` than using `object_id` for hash keys.
#
# This cop is marked as unsafe as a hash possibly can contain other keys
# besides `object_id`s.
#
# @example
# # bad
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/missing_cop_enable_directive.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/missing_cop_enable_directive.rb | # frozen_string_literal: true
# rubocop:disable Lint/RedundantCopDisableDirective
module RuboCop
module Cop
module Lint
# This cop checks that there is an `# rubocop:enable ...` statement
# after a `# rubocop:disable ...` statement. This will prevent leaving
# cop disables on wide ranges of cod... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/send_with_mixin_argument.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/send_with_mixin_argument.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
#
# This cop checks for `send`, `public_send`, and `__send__` methods
# when using mix-in.
#
# `include` and `prepend` methods were private methods until Ruby 2.0,
# they were mixed-in via `send` method. This ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/syntax.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/syntax.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop repacks Parser's diagnostics/errors
# into RuboCop's offenses.
class Syntax < Base
def on_other_file
add_offense_from_error(processed_source.parser_error) if processed_source.parser_error
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/big_decimal_new.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/big_decimal_new.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# `BigDecimal.new()` is deprecated since BigDecimal 1.3.3.
# This cop identifies places where `BigDecimal.new()`
# can be replaced by `BigDecimal()`.
#
# @example
# # bad
# BigDecimal.new(123.456, 3)... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/circular_argument_reference.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/circular_argument_reference.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for circular argument references in optional keyword
# arguments and optional ordinal arguments.
#
# This cop mirrors a warning produced by MRI since 2.2.
#
# @example
#
# # bad... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/literal_as_condition.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/literal_as_condition.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for literals used as the conditions or as
# operands in and/or expressions serving as the conditions of
# if/while/until.
#
# @example
#
# # bad
# if 20
# do_somethi... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/useless_times.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/useless_times.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for uses of `Integer#times` that will never yield
# (when the integer <= 0) or that will only ever yield once
# (`1.times`).
#
# This cop is marked as unsafe as `times` returns its receiver, which
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/float_out_of_range.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/float_out_of_range.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop identifies Float literals which are, like, really really really
# really really really really really big. Too big. No-one needs Floats
# that big. If you need a float that big, something is wrong with you.
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/self_assignment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/self_assignment.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for self-assignments.
#
# @example
# # bad
# foo = foo
# foo, bar = foo, bar
# Foo = Foo
#
# # good
# foo = bar
# foo, bar = bar, foo
# Foo... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/deprecated_class_methods.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/deprecated_class_methods.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for uses of the deprecated class method usages.
#
# @example
#
# # bad
#
# File.exists?(some_path)
# Dir.exists?(some_path)
# iterator?
#
# @example
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/duplicate_elsif_condition.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/duplicate_elsif_condition.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks that there are no repeated conditions used in if 'elsif'.
#
# @example
# # bad
# if x == 1
# do_something
# elsif x == 1
# do_something_else
# end
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/missing_super.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/missing_super.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for the presence of constructors and lifecycle callbacks
# without calls to `super`.
#
# @example
# # bad
# class Employee < Person
# def initialize(name, salary)
# ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/number_conversion.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/number_conversion.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop warns the usage of unsafe number conversions. Unsafe
# number conversion can cause unexpected error if auto type conversion
# fails. Cop prefer parsing with number class instead.
#
# @example
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/duplicate_rescue_exception.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/duplicate_rescue_exception.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks that there are no repeated exceptions
# used in 'rescue' expressions.
#
# @example
# # bad
# begin
# something
# rescue FirstException
# handle_exception
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/constant_resolution.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/constant_resolution.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# Check that certain constants are fully qualified.
#
# This is not enabled by default because it would mark a lot of offenses
# unnecessarily.
#
# Generally, gems should fully qualify all constants to avoid c... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/ambiguous_block_association.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/ambiguous_block_association.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for ambiguous block association with method
# when param passed without parentheses.
#
# @example
#
# # bad
# some_method a { |val| puts val }
#
# @example
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/format_parameter_mismatch.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/format_parameter_mismatch.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This lint sees if there is a mismatch between the number of
# expected fields for format/sprintf/#% and what is actually
# passed as arguments.
#
# In addition it checks whether different formats are used in the s... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/empty_conditional_body.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/empty_conditional_body.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.
# @example
# # bad
# if condition
# end
#
# # bad
# unless condition
# end
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/erb_new_arguments.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/erb_new_arguments.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
#
# This cop emulates the following Ruby warnings in Ruby 2.6.
#
# % cat example.rb
# ERB.new('hi', nil, '-', '@output_buffer')
# % ruby -rerb example.rb
# example.rb:1: warning: Passing safe_level with ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/multiple_comparison.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/multiple_comparison.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# In math and Python, we can use `x < y < z` style comparison to compare
# multiple value. However, we can't use the comparison in Ruby. However,
# the comparison is not syntax error. This cop checks the bad usage of
# co... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/interpolation_check.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/interpolation_check.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for interpolation in a single quoted string.
#
# @example
#
# # bad
#
# foo = 'something with #{interpolation} inside'
#
# @example
#
# # good
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/unused_method_argument.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/unused_method_argument.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for unused method arguments.
#
# @example
# # bad
# def some_method(used, unused, _unused_but_allowed)
# puts used
# end
#
# # good
# def some_method(use... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/shadowed_argument.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/shadowed_argument.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for shadowed arguments.
#
# This cop has `IgnoreImplicitReferences` configuration option.
# It means argument shadowing is used in order to pass parameters
# to zero arity `super` when `IgnoreImpli... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/ensure_return.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/ensure_return.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for `return` from an `ensure` block.
# `return` from an ensure block is a dangerous code smell as it
# will take precedence over any exception being raised,
# and the exception will be silently thrown aw... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/debugger.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/debugger.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for calls to debugger or pry.
#
# @example
#
# # bad (ok during development)
#
# # using pry
# def some_method
# binding.pry
# do_something
# end... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/useless_method_definition.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/useless_method_definition.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for useless method definitions, specifically: empty constructors
# and methods just delegating to `super`.
#
# This cop is marked as unsafe as it can trigger false positives for cases when
# an emp... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/script_permission.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/script_permission.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks if a file which has a shebang line as
# its first line is granted execute permission.
#
# @example
# # bad
#
# # A file which has a shebang line as its first line is not
# #... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/duplicate_methods.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/duplicate_methods.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for duplicated instance (or singleton) method
# definitions.
#
# @example
#
# # bad
#
# def foo
# 1
# end
#
# def foo
# 2
# e... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_with_index.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_with_index.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for redundant `with_index`.
#
# @example
# # bad
# ary.each_with_index do |v|
# v
# end
#
# # good
# ary.each do |v|
# v
# end
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/top_level_return_with_argument.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/top_level_return_with_argument.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for top level return with arguments. If there is a
# top-level return statement with an argument, then the argument is
# always ignored. This is detected automatically since Ruby 2.7.
#
# @example
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/ineffective_access_modifier.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/ineffective_access_modifier.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for `private` or `protected` access modifiers which are
# applied to a singleton method. These access modifiers do not make
# singleton methods private/protected. `private_class_method` can be
# used for... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/rescue_exception.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/rescue_exception.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for `rescue` blocks targeting the Exception class.
#
# @example
#
# # bad
#
# begin
# do_something
# rescue Exception
# handle_exception
# end
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_safe_navigation.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_safe_navigation.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for redundant safe navigation calls.
# `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, and `equal?` methods
# are checked by default. These are customizable with `AllowedMethods` option.
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/empty_expression.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/empty_expression.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for the presence of empty expressions.
#
# @example
#
# # bad
#
# foo = ()
# if ()
# bar
# end
#
# @example
#
# # good
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/flip_flop.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/flip_flop.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop looks for uses of flip-flop operator.
# flip-flop operator is deprecated since Ruby 2.6.0.
#
# @example
# # bad
# (1..20).each do |x|
# puts x if (x == 5) .. (x == 10)
# end
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_with_object.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_with_object.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for redundant `with_object`.
#
# @example
# # bad
# ary.each_with_object([]) do |v|
# v
# end
#
# # good
# ary.each do |v|
# v
# end
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb | # frozen_string_literal: true
# The Lint/RedundantCopEnableDirective and Lint/RedundantCopDisableDirective
# cops need to be disabled so as to be able to provide a (bad) example of an
# unneeded enable.
# rubocop:disable Lint/RedundantCopEnableDirective
# rubocop:disable Lint/RedundantCopDisableDirective
module RuboC... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/rescue_type.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/rescue_type.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# Check for arguments to `rescue` that will result in a `TypeError`
# if an exception is raised.
#
# @example
# # bad
# begin
# bar
# rescue nil
# baz
# end
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/empty_when.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/empty_when.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for the presence of `when` branches without a body.
#
# @example
#
# # bad
# case foo
# when bar
# do_something
# when baz
# end
#
# @example... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/loop.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/loop.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for uses of `begin...end while/until something`.
#
# @example
#
# # bad
#
# # using while
# begin
# do_something
# end while some_condition
#
#... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/float_comparison.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/float_comparison.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for the presence of precise comparison of floating point numbers.
#
# Floating point values are inherently inaccurate, and comparing them for exact equality
# is almost never the desired semantics. Compa... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/safe_navigation_chain.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/safe_navigation_chain.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# The safe navigation operator returns nil if the receiver is
# nil. If you chain an ordinary method call after a safe
# navigation operator, it raises NoMethodError. We should use a
# safe navigation operator after a saf... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_require_statement.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/redundant_require_statement.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# Checks for unnecessary `require` statement.
#
# The following features are unnecessary `require` statement because
# they are already loaded.
#
# ruby -ve 'p $LOADED_FEATURES.reject { |feature| %r|/| =~ fe... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/struct_new_override.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/struct_new_override.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks unexpected overrides of the `Struct` built-in methods
# via `Struct.new`.
#
# @example
# # bad
# Bad = Struct.new(:members, :clone, :count)
# b = Bad.new([], true, 1)
# b.... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for places where binary operator has identical operands.
#
# It covers arithmetic operators: `+`, `-`, `*`, `/`, `%`, `**`;
# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, `<=`;
# bitwis... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/boolean_symbol.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/boolean_symbol.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for `:true` and `:false` symbols.
# In most cases it would be a typo.
#
# @example
#
# # bad
# :true
#
# # good
# true
#
# @example
#
#... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/suppressed_exception.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/suppressed_exception.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for `rescue` blocks with no body.
#
# @example
#
# # bad
# def some_method
# do_something
# rescue
# end
#
# # bad
# begin
# do_s... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/safe_navigation_with_empty.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/safe_navigation_with_empty.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks to make sure safe navigation isn't used with `empty?` in
# a conditional.
#
# While the safe navigation operator is generally a good idea, when
# checking `foo&.empty?` in a conditional, `foo` bein... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/literal_in_interpolation.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/literal_in_interpolation.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for interpolated literals.
#
# @example
#
# # bad
#
# "result is #{10}"
#
# @example
#
# # good
#
# "result is 10"
class LiteralInInter... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/ambiguous_operator.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/ambiguous_operator.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for ambiguous operators in the first argument of a
# method invocation without parentheses.
#
# @example
#
# # bad
#
# # The `*` is interpreted as a splat operator but it coul... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/percent_string_array.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/percent_string_array.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for quotes and commas in %w, e.g. `%w('foo', "bar")`
#
# It is more likely that the additional characters are unintended (for
# example, mistranslating an array of literals to percent string notation)
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/raise_exception.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/raise_exception.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for `raise` or `fail` statements which are
# raising `Exception` class.
#
# You can specify a module name that will be an implicit namespace
# using `AllowedImplicitNamespaces` option. The cop caus... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/uri_regexp.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/uri_regexp.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop identifies places where `URI.regexp` is obsolete and should
# not be used. Instead, use `URI::DEFAULT_PARSER.make_regexp`.
#
# @example
# # bad
# URI.regexp('http://example.com')
#
#... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/duplicate_require.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/duplicate_require.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for duplicate `require`s and `require_relative`s.
#
# @example
# # bad
# require 'foo'
# require 'bar'
# require 'foo'
#
# # good
# require 'foo'
# ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/return_in_void_context.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/return_in_void_context.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for the use of a return with a value in a context
# where the value will be ignored. (initialize and setter methods)
#
# @example
#
# # bad
# def initialize
# foo
# ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for underscore-prefixed variables that are actually
# used.
#
# Since block keyword arguments cannot be arbitrarily named at call
# sites, the `AllowKeywordBlockArguments` will allow use of undersc... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/empty_interpolation.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/lint/empty_interpolation.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for empty interpolation.
#
# @example
#
# # bad
#
# "result is #{}"
#
# @example
#
# # good
#
# "result is #{some_result}"
class EmptyI... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.