Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/update dependencies 3 #33

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 0 additions & 2 deletions .env

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ dump.rdb
.env
/public
.env
stranger_tides_notes_do_not_commit.rb
209 changes: 184 additions & 25 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,201 @@
require: rubocop-rails
require: rubocop-rspec
# This is the configuration used to check the rubocop source code.

inherit_from: .rubocop_todo.yml
require:
- rubocop/cop/internal_affairs
- rubocop-performance
- rubocop-rspec
- rubocop-rake

AllCops:
TargetRubyVersion: 2.7
DisplayCopNames: true
Include:
- Rakefile
- config.ru
- lib/**/*.rake
NewCops: enable
Exclude:
- 'vendor/**/*'
- 'spec/fixtures/**/*'
- 'spec/support/fixtures/**/*'
- 'tmp/**/*'
- 'db/schema.rb'
- 'Gemfile'

Metrics/MethodLength:
# Default is 10
Max: 10
TargetRubyVersion: 2.6
SuggestExtensions: false

Metrics/CyclomaticComplexity:
Max: 8
Naming/PredicateName:
# Method define macros for dynamically generated method.
MethodDefinitionMacros:
- define_method
- define_singleton_method
- def_node_matcher
- def_node_search

Metrics/PerceivedComplexity:
Max: 12
Style/AccessorGrouping:
Exclude:
- lib/rubocop/formatter/base_formatter.rb
- lib/rubocop/cop/offense.rb

Metrics/LineLength:
# Default is 80
Max: 80
Style/FormatStringToken:
# Because we parse a lot of source codes from strings. Percent arrays
# look like unannotated format string tokens to this cop.
Exclude:
- 'lib/**/*'
- spec/**/*

Style/IpAddresses:
# The test for this cop includes strings that would cause offenses
Exclude:
- spec/rubocop/cop/style/ip_addresses_spec.rb

Layout/EndOfLine:
EnforcedStyle: lf

Layout/ClassStructure:
Enabled: true

Metrics/AbcSize:
# Default is 15
Max: 15
Layout/RedundantLineBreak:
Enabled: true

Layout/TrailingWhitespace:
AllowInHeredoc: false

Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/**/*.rb'

Layout/HashAlignment:
EnforcedHashRocketStyle:
- key
- table
EnforcedColonStyle:
- key
- table

Layout/LineLength:
Max: 100
AllowedPatterns:
- !ruby/regexp /\A +(it|describe|context|shared_examples|include_examples|it_behaves_like) ["']/

Lint/InterpolationCheck:
Exclude:
- 'spec/**/*.rb'

Lint/UselessAccessModifier:
MethodCreatingMethods:
- 'def_matcher'
- 'def_node_matcher'

Lint/EmptyFile:
Exclude:
# This file is intentionally empty to catch rubocop cops failing on empty files.
- spec/rubocop/intentionally_empty_file.rb

Metrics/BlockLength:
# Default is 25
Max: 25
Exclude:
- 'Rakefile'
- '**/*.rake'
- 'spec/**/*.rb'
- '**/*.gemspec'

Metrics/ClassLength:
Exclude:
- lib/rubocop/config_obsoletion.rb
- lib/rubocop/options.rb

Metrics/ModuleLength:
Exclude:
- 'spec/**/*.rb'

Naming/InclusiveLanguage:
Enabled: true
CheckStrings: true
FlaggedTerms:
' a offense':
Suggestions:
- an offense
auto-correct:
Suggestions:
- autocorrect
auto_correct:
Suggestions:
- autocorrect
behaviour:
Suggestions:
- behavior
offence:
Suggestions:
- offense
'does not registers':
Suggestions:
- does not register
Exclude:
- lib/rubocop/cop/naming/inclusive_language.rb
- lib/rubocop/cop/mixin/auto_corrector.rb
- spec/rubocop/cop/naming/inclusive_language_spec.rb

RSpec:
Language:
Expectations:
- expect_autocorrect_options_for_autocorrect
- expect_autocorrect_options_for_autocorrect_all
- expect_autocorrect_options_for_fix_layout
- expect_correction
- expect_feature_loader
- expect_no_offenses
- expect_offense

RSpec/FilePath:
Exclude:
- spec/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new_spec.rb
- spec/rubocop/formatter/junit_formatter_spec.rb

RSpec/PredicateMatcher:
EnforcedStyle: explicit

RSpec/MessageSpies:
EnforcedStyle: receive

RSpec/NestedGroups:
Max: 7

RSpec/MultipleMemoizedHelpers:
Enabled: false

Performance/CollectionLiteralInLoop:
Exclude:
- 'Rakefile'
- 'spec/**/*.rb'

Performance/EndWith:
SafeMultiline: false

Performance/StartWith:
SafeMultiline: false

RSpec/StubbedMock:
Enabled: false

InternalAffairs/ExampleDescription:
Include:
- 'spec/rubocop/cop/**/*.rb'

InternalAffairs/ExampleHeredocDelimiter:
Include:
- 'spec/rubocop/cop/**/*.rb'

InternalAffairs/UndefinedConfig:
Include:
- 'lib/rubocop/cop/**/*.rb'
Exclude:
- 'lib/rubocop/cop/correctors/**/*.rb'
- 'lib/rubocop/cop/mixin/**/*.rb'

InternalAffairs/StyleDetectedApiUse:
Exclude:
- 'lib/rubocop/cop/mixin/percent_array.rb'

InternalAffairs/NumblockHandler:
Exclude:
- 'lib/rubocop/cop/internal_affairs/*.rb'

Gemspec/DependencyVersion:
Enabled: true

Style/RequireOrder:
Enabled: true
140 changes: 78 additions & 62 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,84 +1,100 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2021-02-09 20:15:08 UTC using RuboCop version 1.9.1.
# on 2023-03-14 20:19:25 UTC using RuboCop version 1.48.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: 11
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 156

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment:
Lint/DuplicateMethods:
Exclude:
- 'bin/rspec'
- 'app/models/station_data_range_constructor.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
Layout/ExtraSpacing:
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'bin/setup'
- 'spec/factories/graph_processors.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 97
# Offense count: 12
Lint/UselessAssignment:
Exclude:
- 'config/initializers/redis.rb'
- 'spec/factories/stations.rb'

# Offense count: 3
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 29

# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 11

# Offense count: 5
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 32

# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 13

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: final_newline, final_blank_line
Layout/TrailingEmptyLines:
# Configuration parameters: CheckIdentifiers, CheckConstants, CheckVariables, CheckStrings, CheckSymbols, CheckComments, CheckFilepaths, FlaggedTerms.
Naming/InclusiveLanguage:
Exclude:
- 'lib/tasks/coverage.rake'
- 'lib/tasks/deploy.rake'
- 'lib/rubocop/cop/naming/inclusive_language.rb'
- 'lib/rubocop/cop/mixin/auto_corrector.rb'
- 'spec/rubocop/cop/naming/inclusive_language_spec.rb'
- 'spec/rails_helper.rb'

# Offense count: 7
# Cop supports --auto-correct.
Style/ExpandPathArguments:
# Offense count: 3
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Exclude:
- 'Rakefile'
- 'bin/bundle'
- 'bin/rails'
- 'bin/rake'
- 'bin/setup'
- 'config.ru'
- '**/spec/features/**/*'
- '**/spec/requests/**/*'
- '**/spec/routing/**/*'
- '**/spec/system/**/*'
- '**/spec/views/**/*'
- 'spec/lib/tasks/stations_delete_spec.rb'
- 'spec/lib/tasks/stations_id_list_spec.rb'
- 'spec/lib/tasks/stations_metadata_list_spec.rb'

# Offense count: 2
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 16

# Offense count: 13
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
# Offense count: 2
RSpec/MultipleExpectations:
Max: 2

# Offense count: 2
# Configuration parameters: AllowedPatterns.
# AllowedPatterns: ^expect_, ^assert_
RSpec/NoExpectationExample:
Exclude:
- 'Rakefile'
- 'bin/bundle'
- 'bin/rails'
- 'bin/rake'
- 'bin/rspec'
- 'bin/setup'
- 'bin/spring'
- 'config.ru'
- 'lib/tasks/coverage.rake'
- 'lib/tasks/deploy.rake'
- 'lib/tasks/stations_delete.rake'
- 'lib/tasks/stations_id_list.rake'
- 'lib/tasks/stations_metadata_list.rake'
- 'spec/views/stations/show_station.html.erb_spec.rb'
- 'spec/views/stations/show_stations.erb_spec.rb'

# Offense count: 25
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
# Offense count: 18
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false

# Offense count: 1
Style/MixinUsage:
Exclude:
- 'bin/rails'
- 'bin/rspec'
- 'bin/setup'
- 'lib/tasks/coverage.rake'
- 'lib/tasks/deploy.rake'
- 'lib/tasks/stations_delete.rake'
- 'lib/tasks/stations_id_list.rake'
- 'lib/tasks/stations_metadata_list.rake'
- 'app/services/graphing_service.rb'
Loading