Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
crdx committed Mar 16, 2024
1 parent 7e6d4ab commit 9f0dc81
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 44 deletions.
65 changes: 37 additions & 28 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,63 +7,69 @@ AllCops:
# ——————————————————————————————————————————————————————————————————————————————————————————————————

Style/MixinUsage:
Enabled: no
Enabled: false
Style/FormatString:
Enabled: no
Enabled: false
Style/FormatStringToken:
Enabled: no
Enabled: false
Style/StringConcatenation:
Enabled: no
Enabled: false
Style/IfUnlessModifier:
Enabled: no
Enabled: false
Style/RedundantReturn:
Enabled: no
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: no
Enabled: false
Style/NegatedIf:
Enabled: no
Enabled: false
Style/NegatedWhile:
Enabled: no
Enabled: false
Style/Documentation:
Enabled: no
Enabled: false
Style/MultilineBlockChain:
Enabled: no
Enabled: false
Style/PerlBackrefs:
Enabled: no
Enabled: false
Style/StderrPuts:
Enabled: no
Enabled: false
Style/ClassAndModuleChildren:
Enabled: no
Enabled: false
Style/ZeroLengthPredicate:
Enabled: no
Enabled: false
Style/GuardClause:
Enabled: no
Enabled: false
Style/WhileUntilModifier:
Enabled: no
Enabled: false
Style/MutableConstant:
Enabled: no
Enabled: false
Style/ClassVars:
Enabled: no
Enabled: false

Metrics/AbcSize:
Enabled: no
Enabled: false
Metrics/PerceivedComplexity:
Enabled: no
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: no
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false

Naming/HeredocDelimiterNaming:
Enabled: no
Enabled: false
Naming/AccessorMethodName:
Enabled: no
Enabled: false
Naming/MethodParameterName:
Enabled: no
Enabled: false

Layout/LineLength:
Enabled: false

Lint/AmbiguousOperatorPrecedence:
Enabled: no
Enabled: false

# ——————————————————————————————————————————————————————————————————————————————————————————————————
# Configured
Expand All @@ -79,7 +85,7 @@ Style/Semicolon:
AllowAsExpressionSeparator: yes

Style/MethodCallWithArgsParentheses:
Enabled: yes
Enabled: true
IgnoreMacros: false # Top-level calls will not be included otherwise.
AllowedMethods:
- puts
Expand All @@ -102,7 +108,7 @@ Style/MethodCallWithArgsParentheses:
- source

Style/RescueModifier:
Enabled: no
Enabled: false

Style/RescueStandardError:
EnforcedStyle: implicit
Expand Down Expand Up @@ -139,3 +145,6 @@ Layout/IndentationWidth:

Layout/SpaceAroundOperators:
EnforcedStyleForExponentOperator: space

Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PATH
enparallel-bin (1.0.11)
colorize (~> 0.8.1)
docopt (~> 0.6.1)
json (~> 2.7)
require_all (~> 3.0)
soml (~> 1.0.1)

Expand All @@ -14,6 +15,7 @@ GEM
diff-lcs (1.4.4)
docile (1.4.0)
docopt (0.6.1)
json (2.7.1)
rake (13.0.6)
require_all (3.0.0)
rspec (3.10.0)
Expand Down
27 changes: 13 additions & 14 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,39 @@ import? 'internal.just'
help:
just --list --unsorted

# build gem
init:
bundle install

build:
bundle exec rake build

# remove built gems
clean:
rm -vf pkg/*

# build and install the gem globally to the system
install:
bundle exec rake install

# run the gem's binary
run +args:
{{ BIN }} {{ args }}

# run tests
test:
bundle exec rspec
echo
echo o coverage/index.html

# build the asciicasts of enparallel in action
fmt:
just --fmt

lint:
rubocop

fix:
rubocop -A

# build the asciicasts
build-readme:
tools/build-readme

# run 50 unpredictable tasks
run-50:
seq 50 | {{ BIN }} --workers 32 --pick random -- tools/unpredictable-task

# run linter
lint:
rubocop

# fix lint errors
fix:
rubocop -a
1 change: 1 addition & 0 deletions enparallel.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Gem::Specification.new do |spec|

spec.add_runtime_dependency 'colorize', '~> 0.8.1'
spec.add_runtime_dependency 'docopt', '~> 0.6.1'
spec.add_runtime_dependency 'json', '~> 2.7'
spec.add_runtime_dependency 'require_all', '~> 3.0'
spec.add_runtime_dependency 'soml', '~> 1.0.1'

Expand Down
4 changes: 2 additions & 2 deletions spec/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
inherit_from: ../.rubocop.yml

Style/MethodCallWithArgsParentheses:
Enabled: no
Enabled: false
Lint/ParenthesesAsGroupedExpression:
Enabled: no
Enabled: false

0 comments on commit 9f0dc81

Please sign in to comment.