Skip to content

Commit

Permalink
OH BOY lots of changes. Improving setup. Adding extra validity checks…
Browse files Browse the repository at this point in the history
…. Improved config flow.
  • Loading branch information
mattboldt committed Oct 19, 2019
1 parent 3ecd501 commit 3ac64f1
Show file tree
Hide file tree
Showing 15 changed files with 275 additions and 417 deletions.
92 changes: 78 additions & 14 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This is the configuration used to check the rubocop source code.

inherit_from: .rubocop_todo.yml
require:
- rubocop/cop/internal_affairs
- rubocop-rspec
Expand All @@ -21,7 +20,7 @@ Naming/PredicateName:
- def_node_search

Style/FrozenStringLiteralComment:
EnforcedStyle: when_needed
Enabled: false

Style/FormatStringToken:
# Because we parse a lot of source codes from strings. Percent arrays
Expand All @@ -32,7 +31,76 @@ Style/FormatStringToken:
Style/IpAddresses:
# The test for this cop includes strings that would cause offenses
Exclude:
- spec/rubocop/cop/style/ip_addresses_spec.rb
- spec/rubocop/cop/style/ip_addresses_spec.rb

# Checks if uses of quotes match the configured preference.
Style/StringLiterals:
Enabled: false

Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': '()'

# Don't complain about top-level class documentation comments.
Documentation:
Enabled: false

# Don't complain about long block lengths.
Metrics/BlockLength:
Enabled: false

Metrics/ClassLength:
CountComments: false # count full line comments?
Max: 150

Metrics/LineLength:
Max: 105
IgnoredPatterns:
- '(\A|\s)#' # Don't get upset at comments longer than the line length.
- 'authorize %' # Exclude Pundit authorization calls
- 'belongs_to :'
- 'has_many :'
- 'has_and_belongs_to_many :'
- 'has_one :'

Metrics/ModuleLength:
CountComments: false # count full line comments?
Max: 150

Style/AndOr:
# Whether `and` and `or` are banned only in conditionals (conditionals)
# or completely (always).
EnforcedStyle: always

Style/ClassAndModuleChildren:
Enabled: false

Style/Lambda:
EnforcedStyle: literal

Layout/EmptyLinesAroundClassBody:
Enabled: false

Layout/EmptyLinesAroundBlockBody:
Enabled: false

Layout/EndAlignment:
EnforcedStyleAlignWith: variable

Style/GuardClause:
Enabled: false

Style/PercentLiteralDelimiters:
Enabled: false

Style/TrailingCommaInArguments:
Enabled: false

Style/TrailingCommaInArrayLiteral:
Enabled: false

Style/TrailingCommaInHashLiteral:
Enabled: false

Layout/EndOfLine:
EnforcedStyle: lf
Expand All @@ -45,13 +113,13 @@ Layout/ClassStructure:
- prepend
- extend
ExpectedOrder:
- module_inclusion
- constants
- public_class_methods
- initializer
- instance_methods
- protected_methods
- private_methods
- module_inclusion
- constants
- public_class_methods
- initializer
- instance_methods
- protected_methods
- private_methods

Layout/IndentHeredoc:
EnforcedStyle: powerpack
Expand Down Expand Up @@ -86,10 +154,6 @@ Metrics/ModuleLength:
Exclude:
- 'spec/**/*.rb'

Performance/Caller:
Exclude:
- spec/rubocop/cop/performance/caller_spec.rb

RSpec/PredicateMatcher:
EnforcedStyle: explicit

Expand Down
263 changes: 0 additions & 263 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,263 +0,0 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-12-09 15:12:18 -0600 using RuboCop version 0.61.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: 1
# Configuration parameters: Include.
# Include: **/*.gemspec
Gemspec/DuplicatedAssignment:
Exclude:
- 'guac.gemspec'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
Layout/EmptyLinesAroundClassBody:
Exclude:
- 'lib/guac/commands/config.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
Layout/IndentHeredoc:
Exclude:
- 'spec/integration/config_spec.rb'
- 'spec/integration/status_spec.rb'
- 'spec/integration/up_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: normal, rails
Layout/IndentationConsistency:
Exclude:
- 'lib/guac/config.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: Width, IgnoredPatterns.
Layout/IndentationWidth:
Exclude:
- 'lib/guac/config.rb'

# Offense count: 1
# Cop supports --auto-correct.
Layout/LeadingBlankLines:
Exclude:
- 'guac.gemspec'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideBlockBraces:
Exclude:
- 'Gemfile'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: final_newline, final_blank_line
Layout/TrailingBlankLines:
Exclude:
- 'lib/guac/config.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
Lint/UnusedMethodArgument:
Exclude:
- 'lib/guac/commands/config.rb'
- 'lib/guac/commands/status.rb'
- 'lib/guac/commands/up.rb'

# Offense count: 2
Lint/UselessAssignment:
Exclude:
- 'lib/guac/sys_command.rb'

# Offense count: 2
Metrics/AbcSize:
Max: 19

# Offense count: 1
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 31

# Offense count: 4
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 15

# Offense count: 3
RSpec/DescribeClass:
Exclude:
- 'spec/integration/config_spec.rb'
- 'spec/integration/status_spec.rb'
- 'spec/integration/up_spec.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: SkipBlocks, EnforcedStyle.
# SupportedStyles: described_class, explicit
RSpec/DescribedClass:
Exclude:
- 'spec/unit/config_spec.rb'
- 'spec/unit/status_spec.rb'
- 'spec/unit/up_spec.rb'

# Offense count: 3
# Configuration parameters: Max.
RSpec/ExampleLength:
Exclude:
- 'spec/integration/config_spec.rb'
- 'spec/integration/status_spec.rb'
- 'spec/integration/up_spec.rb'

# Offense count: 3
# Configuration parameters: CustomTransform, IgnoreMethods.
RSpec/FilePath:
Exclude:
- 'spec/unit/config_spec.rb'
- 'spec/unit/status_spec.rb'
- 'spec/unit/up_spec.rb'

# Offense count: 2
# Cop supports --auto-correct.
Security/YAMLLoad:
Exclude:
- 'lib/guac/config.rb'

# Offense count: 8
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/guac.rb'
- 'lib/guac/colors.rb'
- 'lib/guac/commands/config.rb'
- 'lib/guac/commands/status.rb'
- 'lib/guac/commands/up.rb'
- 'lib/guac/config.rb'
- 'lib/guac/repo.rb'
- 'lib/guac/sys_command.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/ExpandPathArguments:
Exclude:
- 'guac.gemspec'

# Offense count: 15
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: when_needed, always, never
Style/FrozenStringLiteralComment:
Exclude:
- 'Gemfile'
- 'Rakefile'
- 'bin/console'
- 'guac.gemspec'
- 'lib/guac.rb'
- 'lib/guac/config.rb'
- 'lib/guac/version.rb'
- 'spec/guac_spec.rb'
- 'spec/integration/config_spec.rb'
- 'spec/integration/status_spec.rb'
- 'spec/integration/up_spec.rb'
- 'spec/spec_helper.rb'
- 'spec/unit/config_spec.rb'
- 'spec/unit/status_spec.rb'
- 'spec/unit/up_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
Style/HashSyntax:
Exclude:
- 'Rakefile'

# Offense count: 1
# Cop supports --auto-correct.
Style/IfUnlessModifier:
Exclude:
- 'lib/guac/sys_command.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/MutableConstant:
Exclude:
- 'lib/guac/version.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: both, prefix, postfix
Style/NegatedIf:
Exclude:
- 'exe/guac'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
Exclude:
- 'lib/guac/cli.rb'
- 'lib/guac/repo.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: use_perl_names, use_english_names
Style/SpecialGlobalVars:
Exclude:
- 'exe/guac'

# Offense count: 20
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'Gemfile'
- 'Rakefile'
- 'bin/console'
- 'lib/guac.rb'
- 'lib/guac/version.rb'
- 'spec/integration/config_spec.rb'
- 'spec/integration/status_spec.rb'
- 'spec/integration/up_spec.rb'
- 'spec/spec_helper.rb'
- 'spec/unit/config_spec.rb'
- 'spec/unit/status_spec.rb'
- 'spec/unit/up_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInHashLiteral:
Exclude:
- 'lib/guac/commands/config.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/UnneededCondition:
Exclude:
- 'lib/guac/repo.rb'

# Offense count: 12
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 101
Loading

0 comments on commit 3ac64f1

Please sign in to comment.