Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 66 additions & 49 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
inherit_from: .rubocop_todo.yml

inherit_mode:
merge:
- Exclude
- Include

inherit_gem:
rubocop-gusto:
- config/default.yml

# The behavior of RuboCop can be controlled via the .rubocop.yml
# configuration file. It makes it possible to enable/disable
# certain cops (checks) and to alter their behavior if they accept
Expand All @@ -8,13 +19,12 @@
# where the inspected file is and continue its way up to the root directory.
#
# See https://docs.rubocop.org/rubocop/configuration

plugins:
- rubocop-rake
- rubocop-rspec
- rubocop-gusto

AllCops:
NewCops: enable
SuggestExtensions: false
Exclude:
- vendor/bundle/**/**
- bin/**
Expand All @@ -24,114 +34,121 @@ Gemspec/DevelopmentDependencies:
Enabled: true
EnforcedStyle: Gemfile

Metrics/ParameterLists:
Gemspec/RequireMFA:
Enabled: false

# This cop is annoying with typed configuration
Style/TrivialAccessors:
# This leads to code that is not very readable at times (very long lines)
Layout/ArgumentAlignment:
Enabled: false

# This rubocop is annoying when we use interfaces a lot
Lint/UnusedMethodArgument:
# This leads to code that is not very readable at times (very long lines)
Layout/FirstArgumentIndentation:
Enabled: false

Gemspec/RequireMFA:
# Leaving length metrics to human judgment for now
Layout/LineLength:
Enabled: false

Lint/DuplicateBranch:
# This leads to code that is not very readable at times (very long lines)
Layout/MultilineMethodCallIndentation:
Enabled: false

# If is sometimes easier to think about than unless sometimes
Style/NegatedIf:
Lint/DuplicateBranch:
Enabled: false

# It's nice to be able to read the condition first before reading the code within the condition
Style/GuardClause:
# This rubocop is annoying when we use interfaces a lot
Lint/UnusedMethodArgument:
Enabled: false

#
# Leaving length metrics to human judgment for now
#
Metrics/ModuleLength:
Metrics/AbcSize:
Enabled: false

Layout/LineLength:
# Leaving length metrics to human judgment for now
Metrics/BlockLength:
Enabled: false

Metrics/BlockLength:
# Leaving length metrics to human judgment for now
Metrics/ClassLength:
Enabled: false

Metrics/MethodLength:
# This doesn't feel useful
Metrics/CyclomaticComplexity:
Enabled: false

Metrics/AbcSize:
# Leaving length metrics to human judgment for now
Metrics/MethodLength:
Enabled: false

Metrics/ClassLength:
# Leaving length metrics to human judgment for now
Metrics/ModuleLength:
Enabled: false

# This doesn't feel useful
Metrics/CyclomaticComplexity:
Metrics/ParameterLists:
Enabled: false

# This doesn't feel useful
Metrics/PerceivedComplexity:
Enabled: false

# It's nice to be able to read the condition first before reading the code within the condition
Style/IfUnlessModifier:
# Sometimes we like methods like `get_packages`
Naming/AccessorMethodName:
Enabled: false

# This leads to code that is not very readable at times (very long lines)
Style/ConditionalAssignment:
RSpec/ContextWording:
Enabled: false

# For now, we prefer to lean on clean method signatures as documentation. We may change this later.
Style/Documentation:
RSpec/ExampleLength:
Enabled: false

# Sometimes we leave comments in empty else statements intentionally
Style/EmptyElse:
RSpec/MultipleExpectations:
Enabled: false

# Sometimes we want to more explicitly list out a condition
Style/RedundantCondition:
Enabled: false
RSpec/NotToNot:
Enabled: true

# This leads to code that is not very readable at times (very long lines)
Layout/MultilineMethodCallIndentation:
Style/AccessorGrouping:
Enabled: false

# Blocks across lines are okay sometimes
Style/BlockDelimiters:
Enabled: false

Style/StringLiterals:
# This leads to code that is not very readable at times (very long lines)
Style/ConditionalAssignment:
Enabled: false

# Sometimes we like methods like `get_packages`
Naming/AccessorMethodName:
# For now, we prefer to lean on clean method signatures as documentation. We may change this later.
Style/Documentation:
Enabled: false

# This leads to code that is not very readable at times (very long lines)
Layout/FirstArgumentIndentation:
# Sometimes we leave comments in empty else statements intentionally
Style/EmptyElse:
Enabled: false

# This leads to code that is not very readable at times (very long lines)
Layout/ArgumentAlignment:
# It's nice to be able to read the condition first before reading the code within the condition
Style/GuardClause:
Enabled: false

Style/AccessorGrouping:
Style/HashSyntax:
Enabled: false

Style/HashSyntax:
# It's nice to be able to read the condition first before reading the code within the condition
Style/IfUnlessModifier:
Enabled: false

RSpec/MultipleExpectations:
# If is sometimes easier to think about than unless sometimes
Style/NegatedIf:
Enabled: false

RSpec/ExampleLength:
# Sometimes we want to more explicitly list out a condition
Style/RedundantCondition:
Enabled: false

RSpec/ContextWording:
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes

# This cop is annoying with typed configuration
Style/TrivialAccessors:
Enabled: false
53 changes: 53 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 10000`
# on 2026-11-30 21:02:27 UTC using RuboCop version 1.92.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
Gusto/NoMetaprogramming:
Exclude:
- 'lib/code_teams.rb'
- 'lib/code_teams/plugin.rb'

# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
Sorbet/BlockMethodDefinition:
Exclude:
- 'spec/code_teams/plugin_helper_integration_spec.rb'
- 'spec/lib/code_teams/plugin_spec.rb'
- 'spec/lib/code_teams/testing_spec.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutocorrectToRBS.
Sorbet/ForbidTUnsafe:
Exclude:
- 'lib/code_teams/plugin.rb'
- 'lib/code_teams/testing.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Sorbet/RedundantTLetForLiteral:
Exclude:
- 'lib/code_teams/testing.rb'

# Offense count: 4
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SuggestedStrictness.
Sorbet/StrictSigil:
Exclude:
- 'lib/code_teams/plugins/identity.rb'
- 'lib/code_teams/testing/rspec_helpers.rb'
- 'spec/spec_helper.rb'
- 'spec/support/io_helpers.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle, Autocorrect.
# SupportedStyles: module_function, extend_self, forbidden
Style/ModuleFunction:
Exclude:
- 'lib/code_teams/utils.rb'
19 changes: 10 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

# Specify your gem's dependencies in code_teams.gemspec
gemspec

gem 'pry'
gem 'rake'
gem 'rspec', '~> 3.13'
gem 'rubocop'
gem 'rubocop-rake'
gem 'rubocop-rspec'
gem 'sorbet'
gem 'tapioca'
gem "pry"
gem "rake"
gem "rspec", "~> 3.13"
gem "rubocop"
gem "rubocop-gusto", require: false
gem "rubocop-rake"
gem "rubocop-rspec"
gem "sorbet"
gem "tapioca"
21 changes: 21 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,37 @@ GEM
rubocop-ast (1.50.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-gusto (11.12.0)
code_teams
lint_roller
rubocop (>= 1.76)
rubocop-performance
rubocop-rake
rubocop-rspec
rubocop-sorbet (>= 0.13.0)
smart_todo
thor
rubocop-performance (1.27.0)
lint_roller (~> 1.1)
rubocop (>= 1.89.0, < 2.0)
rubocop-ast (>= 1.47.1, < 2.0)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-rspec (3.10.2)
lint_roller (~> 1.1)
regexp_parser (>= 2.0)
rubocop (~> 1.86, >= 1.86.2)
rubocop-sorbet (0.17.2)
rbi (~> 0.4, >= 0.4.3)
rbs (>= 4.1.1)
spoom (~> 1.8)
ruby-progressbar (1.13.0)
rubydex (0.4.1-arm64-darwin)
rubydex (0.4.1-x86_64-darwin)
rubydex (0.4.1-x86_64-linux)
smart_todo (1.11.0)
prism (~> 1.0)
sorbet (0.6.13593)
sorbet-static (= 0.6.13593)
sorbet-runtime (0.6.13593)
Expand Down Expand Up @@ -125,6 +145,7 @@ DEPENDENCIES
rake
rspec (~> 3.13)
rubocop
rubocop-gusto
rubocop-rake
rubocop-rspec
sorbet
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true
# typed: ignore
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

Expand Down
36 changes: 18 additions & 18 deletions code_teams.gemspec
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# frozen_string_literal: true

Gem::Specification.new do |spec|
spec.name = 'code_teams'
spec.version = '1.3.1'
spec.authors = ['Gusto Engineers']
spec.email = ['dev@gusto.com']
spec.summary = 'A low-dependency gem for declaring and querying engineering teams'
spec.description = 'A low-dependency gem for declaring and querying engineering teams'
spec.homepage = 'https://github.com/rubyatscale/code_teams'
spec.license = 'MIT'
spec.name = "code_teams"
spec.version = "1.3.1"
spec.authors = ["Gusto Engineers"]
spec.email = ["dev@gusto.com"]
spec.summary = "A low-dependency gem for declaring and querying engineering teams"
spec.description = "A low-dependency gem for declaring and querying engineering teams"
spec.homepage = "https://github.com/rubyatscale/code_teams"
spec.license = "MIT"

if spec.respond_to?(:metadata)
spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = 'https://github.com/rubyatscale/code_teams'
spec.metadata['changelog_uri'] = 'https://github.com/rubyatscale/code_teams/releases'
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/rubyatscale/code_teams"
spec.metadata["changelog_uri"] = "https://github.com/rubyatscale/code_teams/releases"
spec.metadata["allowed_push_host"] = "https://rubygems.org"
else
raise 'RubyGems 2.0 or newer is required to protect against ' \
'public gem pushes.'
raise "RubyGems 2.0 or newer is required to protect against " \
"public gem pushes."
end

spec.files = Dir['README.md', 'lib/**/*']
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 3.3'
spec.files = Dir["README.md", "lib/**/*"]
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 3.3"

spec.add_dependency 'sorbet-runtime'
spec.add_dependency "sorbet-runtime"
end
Loading