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/cop/mixin/target_ruby_version.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/target_ruby_version.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for checking target ruby version.
module TargetRubyVersion
def required_minimum_ruby_version
@minimum_target_ruby_version
end
def minimum_target_ruby_version(version)
@minimum_target_ruby_version... | 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/mixin/duplication.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/duplication.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for dealing with duplication.
module Duplication
private
# Whether the `collection` contains any duplicates.
#
# @param [Array] collection an array to check for duplicates
# @return [Boolean] whether... | 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/mixin/alignment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/alignment.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This module checks for nodes that should be aligned to the left or right.
# This amount is determined by the instance variable @column_delta.
module Alignment
private
SPACE = ' '
attr_reader :column_delta
def configured_... | 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/mixin/percent_array.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/percent_array.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for handling percent arrays.
module PercentArray
private
# Ruby does not allow percent arrays in an ambiguous block context.
#
# @example
#
# foo %i[bar baz] { qux }
def invalid_percent... | 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/mixin/ignored_pattern.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/ignored_pattern.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This module encapsulates the ability to ignore certain lines when
# parsing.
module IgnoredPattern
private
def ignored_line?(line)
line = if line.respond_to?(:source_line)
line.source_line
elsif... | 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/mixin/end_keyword_alignment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/end_keyword_alignment.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Functions for checking the alignment of the `end` keyword.
module EndKeywordAlignment
include ConfigurableEnforcedStyle
include RangeHelp
MSG = '`end` at %<end_line>d, %<end_col>d is not aligned with ' \
'`%<source>s` at... | 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/mixin/ordered_gem_node.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/ordered_gem_node.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for Bundler/OrderedGems and
# Gemspec/OrderedDependencies.
module OrderedGemNode
private
def get_source_range(node, comments_as_separators)
unless comments_as_separators
first_comment = processed... | 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/mixin/frozen_string_literal.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/frozen_string_literal.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for dealing with frozen string literals.
module FrozenStringLiteral
module_function
FROZEN_STRING_LITERAL = '# frozen_string_literal:'
FROZEN_STRING_LITERAL_ENABLED = '# frozen_string_literal: true'
FROZEN... | 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/mixin/check_line_breakable.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/check_line_breakable.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This mixin detects collections that are safe to "break"
# by inserting new lines. This is useful for breaking
# up long lines.
#
# Let's look at hashes as an example:
#
# We know hash keys are safe to break across lines. We can add... | 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/mixin/empty_lines_around_body.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/empty_lines_around_body.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Layout
# Common functionality for checking if presence/absence of empty lines
# around some kind of body matches the configuration.
module EmptyLinesAroundBody
extend NodePattern::Macros
include ConfigurableEnforcedS... | 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/mixin/match_range.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/match_range.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for obtaining source ranges from regexp matches
module MatchRange
include RangeHelp
private
# Return a new `Range` covering the first matching group number for each
# match of `regex` inside `range`
... | 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/mixin/multiline_expression_indentation.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/multiline_expression_indentation.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for checking multiline method calls and binary
# operations.
module MultilineExpressionIndentation # rubocop:disable Metrics/ModuleLength
KEYWORD_ANCESTOR_TYPES = %i[for if while until return].freeze
UNALIGNED_RHS... | 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/mixin/def_node.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/def_node.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for checking def nodes.
module DefNode
extend NodePattern::Macros
NON_PUBLIC_MODIFIERS = %w[private protected].freeze
private
def non_public?(node)
non_public_modifier?(node.parent) ||
... | 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/mixin/visibility_help.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/visibility_help.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Help methods for determining node visibility.
module VisibilityHelp
extend NodePattern::Macros
VISIBILITY_SCOPES = %i[private protected public].freeze
private
def node_visibility(node)
scope = find_visibility_start(n... | 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/mixin/comments_help.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/comments_help.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Help methods for working with nodes containing comments.
module CommentsHelp
include VisibilityHelp
def source_range_with_comment(node)
begin_pos = begin_pos_with_comment(node)
end_pos = end_position_for(node)
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/mixin/min_body_length.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/min_body_length.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for checking minimum body length.
module MinBodyLength
private
def min_body_length?(node)
(node.loc.end.line - node.loc.keyword.line) > min_body_length
end
def min_body_length
length = cop... | 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/mixin/array_min_size.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/array_min_size.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Handles the `MinSize` configuration option for array-based cops
# `Style/SymbolArray` and `Style/WordArray`, which check for use of the
# relevant percent literal syntax such as `%i[...]` and `%w[...]`
module ArrayMinSize
private
... | 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/mixin/method_complexity.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/method_complexity.rb | # frozen_string_literal: true
module RuboCop
module Cop
# @api private
#
# This module handles measurement and reporting of complexity in methods.
module MethodComplexity
include ConfigurableMax
include IgnoredMethods
include Metrics::Utils::RepeatedCsendDiscount
extend NodePa... | 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/mixin/line_length_help.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/line_length_help.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Help methods for determining if a line is too long.
module LineLengthHelp
private
def ignore_cop_directives?
config.for_cop('Layout/LineLength')['IgnoreCopDirectives']
end
def directive_on_source_line?(line_index)
... | 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/mixin/integer_node.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/integer_node.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for checking integer nodes.
module IntegerNode
private
def integer_part(node)
node.source.sub(/^[+-]/, '').split(/[eE.]/, 2).first
end
end
end
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/mixin/configurable_numbering.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/configurable_numbering.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This module provides functionality for checking if numbering match the
# configured EnforcedStyle.
module ConfigurableNumbering
include ConfigurableFormatting
FORMATS = {
snake_case: /(?:[[[:lower:]]_]|_\d+)$/,
normal... | 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/mixin/rational_literal.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/rational_literal.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for handling Rational literals.
module RationalLiteral
extend NodePattern::Macros
private
def_node_matcher :rational_literal?, <<~PATTERN
(send
(int _) :/
(rational _))
PATTERN... | 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/mixin/method_preference.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/method_preference.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common code for cops that deal with preferred methods.
module MethodPreference
private
def preferred_method(method)
preferred_methods[method.to_sym]
end
def preferred_methods
@preferred_methods ||=
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/mixin/preferred_delimiters.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/preferred_delimiters.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for handling percent literal delimiters.
class PreferredDelimiters
attr_reader :type, :config
PERCENT_LITERAL_TYPES = %w[% %i %I %q %Q %r %s %w %W %x].freeze
def initialize(type, config, preferred_delimiters)
... | 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/mixin/string_help.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/string_help.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Classes that include this module just implement functions to determine
# what is an offense and how to do auto-correction. They get help with
# adding offenses for the faulty string nodes, and with filtering out
# nodes.
module StringHelp
... | 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/mixin/configurable_naming.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/configurable_naming.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This module provides functionality for checking if names match the
# configured EnforcedStyle.
module ConfigurableNaming
include ConfigurableFormatting
FORMATS = {
snake_case: /^@{0,2}[\d[[:lower:]]_]+[!?=]?$/,
camelCa... | 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/mixin/check_assignment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/check_assignment.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for checking assignment nodes.
module CheckAssignment
def on_lvasgn(node)
check_assignment(node, extract_rhs(node))
end
alias on_ivasgn on_lvasgn
alias on_cvasgn on_lvasgn
alias on_gvasgn ... | 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/mixin/statement_modifier.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/statement_modifier.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for modifier cops.
module StatementModifier
include LineLengthHelp
private
def single_line_as_modifier?(node)
return false if non_eligible_node?(node) ||
non_eligible_body?(node.... | 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/mixin/enforce_superclass.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/enforce_superclass.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for enforcing a specific superclass
module EnforceSuperclass
def self.included(base)
base.def_node_matcher :class_definition, <<~PATTERN
(class (const _ !:#{base::SUPERCLASS}) #{base::BASE_PATTERN} ...)
... | 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/mixin/preceding_following_alignment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/preceding_following_alignment.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for checking whether an AST node/token is aligned
# with something on a preceding or following line
module PrecedingFollowingAlignment
private
def allow_for_alignment?
cop_config['AllowForAlignment']
... | 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/mixin/space_after_punctuation.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/space_after_punctuation.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for cops checking for missing space after
# punctuation.
module SpaceAfterPunctuation
MSG = 'Space missing after %<token>s.'
def on_new_investigation
each_missing_space(processed_source.tokens) do |token|
... | 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/mixin/documentation_comment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/documentation_comment.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for checking documentation.
module DocumentationComment
extend NodePattern::Macros
include Style::AnnotationComment
private
def documentation_comment?(node)
preceding_lines = preceding_lines(node)... | 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/mixin/hash_transform_method.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/hash_transform_method.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Common functionality for Style/HashTransformKeys and
# Style/HashTransformValues
module HashTransformMethod # rubocop:disable Metrics/ModuleLength
extend NodePattern::Macros
RESTRICT_ON_SEND = %i[[] to_h].freeze
def_node_matche... | 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/mixin/configurable_max.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/configurable_max.rb | # frozen_string_literal: true
module RuboCop
module Cop
# Handles `Max` configuration parameters, especially setting them to an
# appropriate value with --auto-gen-config.
module ConfigurableMax
private
def max=(value)
cfg = config_to_allow_offenses
cfg[:exclude_limit] ||= {}... | 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/mixin/auto_corrector.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/auto_corrector.rb | # frozen_string_literal: true
module RuboCop
module Cop
# extend this module to signal autocorrection support
module AutoCorrector
def support_autocorrect?
true
end
end
end
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/mixin/annotation_comment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/annotation_comment.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Style
# Common functionality related to annotation comments.
module AnnotationComment
private
# @api public
def annotation?(comment)
_margin, first_word, colon, space, note = split_comment(comment)
... | 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/mixin/multiline_element_line_breaks.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/multiline_element_line_breaks.rb | # frozen_string_literal: true
# TEAM: backend_infra
# WATCHERS: maxh
module RuboCop
module Cop
# Common functionality for checking for a line break before each
# element in a multi-line collection.
module MultilineElementLineBreaks
private
def check_line_breaks(_node, children)
retu... | 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/mixin/ignored_methods.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/mixin/ignored_methods.rb | # frozen_string_literal: true
module RuboCop
module Cop
# This module encapsulates the ability to ignore certain methods when
# parsing.
module IgnoredMethods
private
def ignored_method?(name)
ignored_methods.include?(name.to_s)
end
def ignored_methods
cop_config... | 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/gemspec/ordered_dependencies.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/gemspec/ordered_dependencies.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Gemspec
# Dependencies in the gemspec should be alphabetically sorted.
#
# @example
# # bad
# spec.add_dependency 'rubocop'
# spec.add_dependency 'rspec'
#
# # good
# spec.add_dependency... | 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/gemspec/ruby_version_globals_usage.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Gemspec
# Checks that `RUBY_VERSION` constant is not used in gemspec.
# Using `RUBY_VERSION` is dangerous because value of the
# constant is determined by `rake release`.
# It's possible to have dependency based on ruby versio... | 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/gemspec/required_ruby_version.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/gemspec/required_ruby_version.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Gemspec
# Checks that `required_ruby_version` of gemspec is specified and
# equal to `TargetRubyVersion` of .rubocop.yml.
# Thereby, RuboCop to perform static analysis working on the version
# required by gemspec.
#
... | 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/gemspec/duplicated_assignment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/gemspec/duplicated_assignment.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Gemspec
# An attribute assignment method calls should be listed only once
# in a gemspec.
#
# Assigning to an attribute with the same name using `spec.foo =` will be
# an unintended usage. On the other hand, duplication ... | 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/migration/department_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/migration/department_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Migration
# Check that cop names in rubocop:disable comments are given with
# department name.
class DepartmentName < Base
include RangeHelp
extend AutoCorrector
MSG = 'Department name is missing.'
... | 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/legacy/corrector.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/legacy/corrector.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Legacy
# Legacy Corrector for v0 API support.
# See https://docs.rubocop.org/rubocop/cop_api_v1_changelog.html
class Corrector < RuboCop::Cop::Corrector
# Support legacy second argument
def initialize(source, corr = ... | 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/legacy/corrections_proxy.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/legacy/corrections_proxy.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Legacy
# Legacy support for Corrector#corrections
# See https://docs.rubocop.org/rubocop/cop_api_v1_changelog.html
class CorrectionsProxy
def initialize(corrector)
@corrector = corrector
end
def <<... | 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/security/yaml_load.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/security/yaml_load.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Security
# This cop checks for the use of YAML class methods which have
# potential security issues leading to remote code execution when
# loading from an untrusted source.
#
# @example
# # bad
# YAML.lo... | 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/security/marshal_load.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/security/marshal_load.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Security
# This cop checks for the use of Marshal class methods which have
# potential security issues leading to remote code execution when
# loading from an untrusted source.
#
# @example
# # bad
# Mars... | 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/security/open.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/security/open.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Security
# This cop checks for the use of `Kernel#open`.
#
# `Kernel#open` enables not only file access but also process invocation
# by prefixing a pipe symbol (e.g., `open("| ls")`). So, it may lead to
# a serious secu... | 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/security/eval.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/security/eval.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Security
# This cop checks for the use of `Kernel#eval` and `Binding#eval`.
#
# @example
#
# # bad
#
# eval(something)
# binding.eval(something)
class Eval < Base
MSG = 'The use of `... | 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/security/json_load.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/security/json_load.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Security
# This cop checks for the use of JSON class methods which have potential
# security issues.
#
# Autocorrect is disabled by default because it's potentially dangerous.
# If using a stream, like `JSON.load(open('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/bundler/gem_comment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/bundler/gem_comment.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Bundler
# Add a comment describing each gem in your Gemfile.
#
# Optionally, the "OnlyFor" configuration
# can be used to only register offenses when the gems
# use certain options or have version specifiers.
# Add... | 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/bundler/insecure_protocol_source.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/bundler/insecure_protocol_source.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Bundler
# The symbol argument `:gemcutter`, `:rubygems`, and `:rubyforge`
# are deprecated. So please change your source to URL string that
# 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
#
# 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/bundler/ordered_gems.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/bundler/ordered_gems.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Bundler
# Gems should be alphabetically sorted within groups.
#
# @example
# # bad
# gem 'rubocop'
# gem 'rspec'
#
# # good
# gem 'rspec'
# gem 'rubocop'
#
# # 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/bundler/duplicated_gem.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/bundler/duplicated_gem.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Bundler
# A Gem's requirements should be listed only once in a Gemfile.
# @example
# # bad
# gem 'rubocop'
# gem 'rubocop'
#
# # bad
# group :development do
# gem 'rubocop'
# ... | 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/naming/method_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/method_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop makes sure that all methods use the configured style,
# snake_case or camelCase, for their names.
#
# This cop has `IgnoredPatterns` configuration option.
#
# Naming/MethodName:
# Igno... | 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/naming/accessor_method_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/accessor_method_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop makes sure that accessor methods are named properly.
#
# @example
# # bad
# def set_attribute(value)
# end
#
# # good
# def attribute=(value)
# 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/naming/block_parameter_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/block_parameter_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop checks block parameter names for how descriptive they
# are. It is highly configurable.
#
# The `MinNameLength` config option takes an integer. It represents
# the minimum amount of characters the name ... | 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/naming/method_parameter_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/method_parameter_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop checks method parameter names for how descriptive they
# are. It is highly configurable.
#
# The `MinNameLength` config option takes an integer. It represents
# the minimum amount of characters the name... | 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/naming/rescued_exceptions_variable_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop makes sure that rescued exceptions variables are named as
# expected.
#
# The `PreferredName` config option takes a `String`. It represents
# the required name of the variable. Its default is `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/naming/heredoc_delimiter_naming.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop checks that your heredocs are using meaningful delimiters.
# By default it disallows `END` and `EO*`, and can be configured through
# forbidden listing additional delimiters.
#
# @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/naming/variable_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/variable_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop makes sure that all variables use the configured style,
# snake_case or camelCase, for their names.
#
# @example EnforcedStyle: snake_case (default)
# # bad
# fooBar = 1
#
# # go... | 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/naming/ascii_identifiers.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/ascii_identifiers.rb | # frozen_string_literal: true
# rubocop:disable Style/AsciiComments
module RuboCop
module Cop
module Naming
# This cop checks for non-ascii characters in identifier and constant names.
# Identifiers are always checked and whether constants are checked
# can be controlled using AsciiConstants 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/naming/file_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/file_name.rb | # frozen_string_literal: true
require 'pathname'
module RuboCop
module Cop
module Naming
# This cop makes sure that Ruby source files have snake_case
# names. Ruby scripts (i.e. source files with a shebang in the
# first line) are ignored.
#
# The cop also ignores `.gemspec` files,... | 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/naming/class_and_module_camel_case.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/class_and_module_camel_case.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop checks for class and module names with
# an underscore in them.
#
# `AllowedNames` config takes an array of permitted names.
# Its default value is `['module_parent']`.
# These names can be full 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/naming/memoized_instance_variable_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/memoized_instance_variable_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop checks for memoized methods whose instance variable name
# does not match the method name.
#
# This cop can be configured with the EnforcedStyleForLeadingUnderscores
# directive. It can be configured to... | 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/naming/variable_number.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/variable_number.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop makes sure that all numbered variables use the
# configured style, snake_case, normalcase, or non_integer,
# for their numbering.
#
# @example EnforcedStyle: snake_case
# # 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/naming/heredoc_delimiter_case.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/heredoc_delimiter_case.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop checks that your heredocs are using the configured case.
# By default it is configured to enforce uppercase heredocs.
#
# @example EnforcedStyle: uppercase (default)
# # bad
# <<-sql
# ... | 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/naming/predicate_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/predicate_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop makes sure that predicates are named properly.
#
# @example
# # bad
# def is_even(value)
# end
#
# def is_even?(value)
# end
#
# # good
# def even... | 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/naming/binary_operator_parameter_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/binary_operator_parameter_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop makes sure that certain binary operator methods have their
# sole parameter named `other`.
#
# @example
#
# # bad
# def +(amount); end
#
# # good
# def +(other); 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/naming/constant_name.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/naming/constant_name.rb | # frozen_string_literal: true
module RuboCop
module Cop
module Naming
# This cop checks whether constant names are written using
# SCREAMING_SNAKE_CASE.
#
# To avoid false positives, it ignores cases in which we cannot know
# for certain the type of value that would be assigned to a... | 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/reference.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force/reference.rb | # frozen_string_literal: true
module RuboCop
module Cop
class VariableForce
# This class represents each reference of a variable.
class Reference
include Branchable
VARIABLE_REFERENCE_TYPES = (
[VARIABLE_REFERENCE_TYPE] +
OPERATOR_ASSIGNMENT_TYPES +
[ZER... | 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/branchable.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force/branchable.rb | # frozen_string_literal: true
module RuboCop
module Cop
class VariableForce
# Mix-in module for classes which own a node and need branch information
# of the node. The user classes must implement #node and #scope.
module Branchable
def branch
return @branch if instance_variabl... | 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/assignment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force/assignment.rb | # frozen_string_literal: true
module RuboCop
module Cop
class VariableForce
# This class represents each assignment of a variable.
class Assignment
include Branchable
MULTIPLE_LEFT_HAND_SIDE_TYPE = :mlhs
attr_reader :node, :variable, :referenced, :references
alias r... | 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/scope.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force/scope.rb | # frozen_string_literal: true
module RuboCop
module Cop
class VariableForce
# A Scope represents a context of local variable visibility.
# This is a place where local variables belong to.
# A scope instance holds a scope node and variable entries.
class Scope
OUTER_SCOPE_CHILD_IND... | 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/variable.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force/variable.rb | # frozen_string_literal: true
module RuboCop
module Cop
class VariableForce
# A Variable represents existence of a local variable.
# This holds a variable declaration node and some states of the variable.
class Variable
VARIABLE_DECLARATION_TYPES =
(VARIABLE_ASSIGNMENT_TYPES +... | 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/variable_table.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force/variable_table.rb | # frozen_string_literal: true
module RuboCop
module Cop
class VariableForce
# A VariableTable manages the lifetime of all scopes and local variables
# in a program.
# This holds scopes as stack structure, provides a way to add local
# variables to current scope, and find local variables 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/variable_force/branch.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cop/variable_force/branch.rb | # frozen_string_literal: true
module RuboCop
module Cop
class VariableForce
# Namespace for branch classes for each control structure.
module Branch
def self.of(target_node, scope: nil)
([target_node] + target_node.ancestors).each do |node|
return nil unless node.parent
... | 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/cli/command.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cli/command.rb | # frozen_string_literal: true
module RuboCop
class CLI
# Home of subcommands in the CLI.
# @api private
module Command
class << self
# Find the command with a given name and run it in an environment.
def run(env, name)
class_for(name).new(env).run
end
priv... | 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/cli/environment.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cli/environment.rb | # frozen_string_literal: true
module RuboCop
class CLI
# Execution environment for a CLI command.
# @api private
class Environment
attr_reader :options, :config_store, :paths
def initialize(options, config_store, paths)
@options = options
@config_store = config_store
... | 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/cli/command/version.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cli/command/version.rb | # frozen_string_literal: true
module RuboCop
class CLI
module Command
# Display version.
# @api private
class Version < Base
self.command_name = :version
def run
puts RuboCop::Version.version(debug: false) if @options[:version]
puts RuboCop::Version.version(... | 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/cli/command/execute_runner.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cli/command/execute_runner.rb | # frozen_string_literal: true
module RuboCop
class CLI
module Command
# Run all the selected cops and report the result.
# @api private
class ExecuteRunner < Base
include Formatter::TextUtil
# Combination of short and long formatter names.
INTEGRATION_FORMATTERS = %w[h ... | 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/cli/command/auto_genenerate_config.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cli/command/auto_genenerate_config.rb | # frozen_string_literal: true
module RuboCop
class CLI
module Command
# Generate a configuration file acting as a TODO list.
# @api private
class AutoGenerateConfig < Base
self.command_name = :auto_gen_config
AUTO_GENERATED_FILE = '.rubocop_todo.yml'
PHASE_1 = 'Phase 1... | 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/cli/command/base.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cli/command/base.rb | # frozen_string_literal: true
module RuboCop
class CLI
module Command
# A subcommand in the CLI.
# @api private
class Base
attr_reader :env
@subclasses = []
class << self
attr_accessor :command_name
def inherited(subclass)
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/cli/command/show_cops.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cli/command/show_cops.rb | # frozen_string_literal: true
module RuboCop
class CLI
module Command
# Shows the given cops, or all cops by default, and their configurations
# for the current directory.
# @api private
class ShowCops < Base
self.command_name = :show_cops
def initialize(env)
su... | 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/cli/command/init_dotfile.rb | .bundles_cache/ruby/2.6.0/gems/rubocop-0.93.1/lib/rubocop/cli/command/init_dotfile.rb | # frozen_string_literal: true
module RuboCop
class CLI
module Command
# Generate a .rubocop.yml file in the current directory.
# @api private
class InitDotfile < Base
DOTFILE = ConfigLoader::DOTFILE
self.command_name = :init
def run
path = File.expand_path(DO... | 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/yell-2.2.2/examples/006.2-the-loggable-module-with-inheritance.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/006.2-the-loggable-module-with-inheritance.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# You can add logging to any class by including the Yell::Loggable module.
#
# When including the module, your class will get a :logger method. Before you
# can use it, though, you will need to define a logger providing the :name of
# your class.
Yell.new... | 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/yell-2.2.2/examples/003.4-formatting-on-your-own.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/003.4-formatting-on-your-own.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# The extended formatting string looks like: %d [%5L] %p %h : %m.
logger = Yell.new STDOUT, format: "[%f:%n in `%M'] %m", trace: true
logger.info "Hello World!"
#=> [003.4-formatting-on-your-own.rb:20 in `<main>'] Hello World!
# ^ ... | 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/yell-2.2.2/examples/002.2-log-level-on-certain-severities-only.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/002.2-log-level-on-certain-severities-only.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# The Yell::Level parser allows you to exactly specify on which levels to log,
# ignoring all the others. For instance: If we want to only log at the :debug
# and :warn levels we simply providing an array:
# * %i[] is a built-in for an array of symbols
... | 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/yell-2.2.2/examples/003.3-formatting-ExtendedFormat.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/003.3-formatting-ExtendedFormat.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# The extended formatting string looks like: %d [%5L] %p %h : %m.
logger = Yell.new STDOUT, format: Yell::ExtendedFormat
logger.info "Hello World!"
#=> "2012-02-29T09:30:00+01:00 [ INFO] 65784 localhost : Hello World!"
# ^ ^ ... | 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/yell-2.2.2/examples/005.1-repository.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/005.1-repository.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# You can add a logger to the global repository.
#
# create a logger named 'mylog' that logs to stdout
Yell.new :stdout, name: 'mylog'
# Later in the code, you can get your logger back
Yell['mylog'].info "Hello World!"
EOS
puts "=== actual 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/yell-2.2.2/examples/002.1-log-level-basics.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/002.1-log-level-basics.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# Like many other logging libraries, Yell allows you to define from which level
# onwards you want to write your log message.
logger = Yell.new STDOUT, level: :info
logger.debug "This is a :debug message"
#=> nil
logger.info "This is a :info message"... | 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/yell-2.2.2/examples/003.1-formatting-DefaultFormat.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/003.1-formatting-DefaultFormat.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# The default formatting string looks like: %d [%5L] %p : %m and is used when
# nothing else is defined.
logger = Yell.new STDOUT, format: Yell::DefaultFormat
logger.info "Hello World!"
#=> "2012-02-29T09:30:00+01:00 [ INFO] 65784 : Hello World!"
# ^ ... | 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/yell-2.2.2/examples/003.2-formatting-BasicFormat.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/003.2-formatting-BasicFormat.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# The basic formating string looks like: %l, %d: %m.
logger = Yell.new STDOUT, format: Yell::BasicFormat
logger.info "Hello World!"
#=> "I, 2012-02-29T09:30:00+01:00 : Hello World!"
# ^ ^ ^
# ^ ISO8601 Timestamp M... | 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/yell-2.2.2/examples/006.1-the-loggable-module.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/006.1-the-loggable-module.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# You can add logging to any class by including the Yell::Loggable module.
#
# When including the module, your class will get a :logger method. Before you
# can use it, though, you will need to define a logger providing the :name of
# your class.
Yell.new... | 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/yell-2.2.2/examples/002.3-log-level-within-range.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/002.3-log-level-within-range.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# Additionally to writing only on specific levels, you may pass a range to
# the :level option:
# * %i[] is a built-in for an array of symbols
logger = Yell.new STDOUT, level: (:debug..:warn)
%i[debug info warn error fatal].each do |level|
logger.se... | 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/yell-2.2.2/examples/001-basic-usage.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/001-basic-usage.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# On the basics, Yell works just like any other logging library.
#
# However, it enriches your log messages to make it more readable. By default,
# it will format the given message as follows:
logger = Yell.new STDOUT
logger.info "Hello World!"
#=> "20... | 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/yell-2.2.2/examples/004.1-colorizing-the-log-output.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/examples/004.1-colorizing-the-log-output.rb | # encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
You may colorize the log output on your io-based loggers loke so:
logger = Yell.new STDOUT, colors: true
Yell::Severities.each do |level|
logger.send level.downcase, level
end
EOS
puts "=== actual example ==="
logger = Yell.new STDOUT, colors: true
... | 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/yell-2.2.2/lib/yell.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/lib/yell.rb | # Copyright (c) 2011-2014 Rudolf Schmidt
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,... | 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/yell-2.2.2/lib/yell/repository.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/lib/yell/repository.rb | require 'monitor'
require "singleton"
module Yell #:nodoc:
class LoggerNotFound < StandardError
def message; "Could not find a Yell::Logger instance with the name '#{super}'"; end
end
class Repository
extend MonitorMixin
include Singleton
def initialize
@loggers = {}
end
# Set l... | 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/yell-2.2.2/lib/yell/version.rb | .bundles_cache/ruby/2.6.0/gems/yell-2.2.2/lib/yell/version.rb | module Yell #:nodoc:
VERSION = "2.2.2"
end
| 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.