Skip to content

Commit

Permalink
New advent of code repo
Browse files Browse the repository at this point in the history
  • Loading branch information
gregawoods committed Dec 1, 2023
0 parents commit 387c976
Show file tree
Hide file tree
Showing 21 changed files with 729 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- name: Cache gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-rubydeps-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-rubydeps-
- name: Install gems
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run Rubocop
run: bundle exec rubocop --parallel
- name: Run tests
run: bundle exec rake test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
inputs/*.txt
.session
282 changes: 282 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
AllCops:
TargetRubyVersion: 3.2.2
SuggestExtensions: false
NewCops: enable
Exclude:
- 'bin/*'
- 'vendor/**/*'
Layout/ArgumentAlignment:
Enabled: true
EnforcedStyle: with_fixed_indentation
Metrics/PerceivedComplexity:
Enabled: true
Max: 50
Metrics/CyclomaticComplexity:
Enabled: true
Max: 50
Layout/ClosingParenthesisIndentation:
Enabled: false
Layout/EmptyLinesAroundClassBody:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/EmptyLinesAroundBlockBody:
Enabled: false
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/FirstHashElementIndentation:
Enabled: true
EnforcedStyle: consistent
Layout/LineLength:
Max: 120
Layout/MultilineMethodCallBraceLayout:
Enabled: false
Layout/ParameterAlignment:
Enabled: false
EnforcedStyle: with_fixed_indentation
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Lint/DeprecatedOpenSSLConstant:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Metrics/BlockLength:
Exclude:
- 'Rakefile'
- '**/*.rake'
- 'spec/**/*.rb'
- '*.gemspec'
Max: 100
Metrics/MethodLength:
Enabled: true
Max: 100
Exclude:
- '**/*.rake'
Metrics/ModuleLength:
Enabled: true
Exclude:
- 'spec/**/*.rb'
Metrics/AbcSize:
Max: 100
Metrics/ClassLength:
Enabled: false
Metrics/ParameterLists:
Enabled: true
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Style/EmptyMethod:
Enabled: false
Style/ExponentialNotation:
Enabled: true
Style/FrozenStringLiteralComment:
Enabled: false
Style/GuardClause:
MinBodyLength: 3
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/RedundantReturn:
Enabled: false
Style/SlicingWithRange:
Enabled: true
Style/SymbolArray:
Enabled: false
Style/WordArray:
Enabled: false
Lint/DuplicateElsifCondition:
Enabled: true
Lint/MixedRegexpCaptureTypes:
Enabled: true
Style/AccessorGrouping:
Enabled: true
Style/ArrayCoercion:
Enabled: true
Style/BisectedAttrAccessor:
Enabled: true
Style/CaseLikeIf:
Enabled: true
Style/HashAsLastArrayItem:
Enabled: true
Style/HashLikeCase:
Enabled: true
Style/RedundantAssignment:
Enabled: true
Style/RedundantFetchBlock:
Enabled: true
Style/RedundantFileExtensionInRequire:
Enabled: true
Style/RedundantRegexpCharacterClass:
Enabled: true
Style/RedundantRegexpEscape:
Enabled: true
Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true
Lint/DuplicateRescueException:
Enabled: true
Lint/EmptyConditionalBody:
Enabled: true
Lint/FloatComparison:
Enabled: true
Lint/MissingSuper:
Enabled: true
Lint/OutOfRangeRegexpRef:
Enabled: true
Lint/SelfAssignment:
Enabled: true
Lint/TopLevelReturnWithArgument:
Enabled: true
Lint/UnreachableLoop:
Enabled: true
Style/ExplicitBlockArgument:
Enabled: true
Style/GlobalStdStream:
Enabled: true
Style/OptionalBooleanParameter:
Enabled: true
Style/SingleArgumentDig:
Enabled: true
Style/StringConcatenation:
Enabled: true
Layout/BeginEndAlignment: # (new in 0.91)
Enabled: true
Lint/ConstantDefinitionInBlock: # (new in 0.91)
Enabled: true
Lint/DuplicateRequire: # (new in 0.90)
Enabled: true
Lint/EmptyFile: # (new in 0.90)
Enabled: true
Lint/HashCompareByIdentity: # (new in 0.93)
Enabled: true
Lint/IdentityComparison: # (new in 0.91)
Enabled: true
Lint/RedundantSafeNavigation: # (new in 0.93)
Enabled: true
Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
Enabled: true
Lint/UselessMethodDefinition: # (new in 0.90)
Enabled: true
Lint/UselessTimes: # (new in 0.91)
Enabled: true
Style/ClassEqualityComparison: # (new in 0.93)
Enabled: true
Style/CombinableLoops: # (new in 0.90)
Enabled: true
Style/KeywordParametersOrder: # (new in 0.90)
Enabled: true
Style/RedundantSelfAssignment: # (new in 0.90)
Enabled: true
Style/SoleNestedConditional: # (new in 0.89)
Enabled: true
Layout/SpaceBeforeBrackets: # (new in 1.7)
Enabled: true
Lint/AmbiguousAssignment: # (new in 1.7)
Enabled: true
Lint/DeprecatedConstants: # (new in 1.8)
Enabled: true
Lint/DuplicateBranch: # (new in 1.3)
Enabled: true
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
Enabled: true
Lint/EmptyBlock: # (new in 1.1)
Enabled: true
Lint/EmptyClass: # (new in 1.3)
Enabled: true
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
Enabled: true
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
Enabled: true
Lint/RedundantDirGlobSort: # (new in 1.8)
Enabled: true
Lint/ToEnumArguments: # (new in 1.1)
Enabled: true
Lint/UnexpectedBlockArity: # (new in 1.5)
Enabled: true
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
Enabled: true
Style/ArgumentsForwarding: # (new in 1.1)
Enabled: true
Style/CollectionCompact: # (new in 1.2)
Enabled: true
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
Enabled: true
Style/EndlessMethod: # (new in 1.8)
Enabled: true
Style/HashExcept: # (new in 1.7)
Enabled: true
Style/NegatedIfElseCondition: # (new in 1.2)
Enabled: true
Style/NilLambda: # (new in 1.3)
Enabled: true
Style/RedundantArgument: # (new in 1.4)
Enabled: true
Style/SwapValues: # (new in 1.1)
Enabled: true
Lint/NumberedParameterAssignment: # (new in 1.9)
Enabled: true
Lint/OrAssignmentToConstant: # (new in 1.9)
Enabled: true
Lint/SymbolConversion: # (new in 1.9)
Enabled: true
Lint/TripleQuotes: # (new in 1.9)
Enabled: true
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
Enabled: true
Gemspec/DeprecatedAttributeAssignment: # (new in 1.10)
Enabled: true
Style/HashConversion: # (new in 1.10)
Enabled: true
Layout/LineEndStringConcatenationIndentation: # new in 1.18
Enabled: true
Lint/AmbiguousOperatorPrecedence: # new in 1.21
Enabled: true
Lint/AmbiguousRange: # new in 1.19
Enabled: true
Lint/EmptyInPattern: # new in 1.16
Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
Enabled: true
Lint/RequireRelativeSelfPath: # new in 1.22
Enabled: true
Security/IoMethods: # new in 1.22
Enabled: true
Style/InPatternThen: # new in 1.16
Enabled: true
Style/MultilineInPatternThen: # new in 1.16
Enabled: true
Style/NumberedParameters: # new in 1.22
Enabled: true
Style/NumberedParametersLimit: # new in 1.22
Enabled: true
Style/QuotedSymbols: # new in 1.16
Enabled: true
Style/RedundantSelfAssignmentBranch: # new in 1.19
Enabled: true
Style/SelectByRegexp: # new in 1.22
Enabled: true
Style/StringChars: # new in 1.12
Enabled: true
Gemspec/RequireMFA: # new in 1.23
Enabled: true
Lint/UselessRuby2Keywords: # new in 1.23
Enabled: true
Naming/BlockForwarding: # new in 1.24
Enabled: true
Style/FileRead: # new in 1.24
Enabled: true
Style/FileWrite: # new in 1.24
Enabled: true
Style/MapToHash: # new in 1.24
Enabled: true
Style/NestedFileDirname: # new in 1.26
Enabled: true
Style/OpenStructUse: # new in 1.23
Enabled: false
Style/NumericLiterals:
Enabled: false
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'debug'
gem 'minitest'
gem 'rake'
gem 'rubocop'
gem 'solargraph'
Loading

0 comments on commit 387c976

Please sign in to comment.