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 3c5b962 commit eefd5fd
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 40 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 @@ -103,7 +109,7 @@ Style/MethodCallWithArgsParentheses:
- extension

Style/RescueModifier:
Enabled: no
Enabled: false

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

Layout/SpaceAroundOperators:
EnforcedStyleForExponentOperator: space

Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
source 'https://rubygems.org'
gemspec

gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.8'
gem 'simplecov', '~> 0'
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
docwatch-bin (2.3.0)
colorize (~> 0.8.1)
docopt (~> 0.6.1)
json (~> 2.7)
nokogiri (~> 1.10)
redcarpet (~> 3.5)
require_all (~> 3.0)
Expand All @@ -16,6 +17,7 @@ GEM
diff-lcs (1.5.0)
docile (1.4.0)
docopt (0.6.1)
json (2.7.1)
mini_portile2 (2.8.5)
nokogiri (1.16.2)
mini_portile2 (~> 2.8.2)
Expand Down
15 changes: 7 additions & 8 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,31 @@ 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

# run linter
lint:
rubocop

# fix lint errors
fix:
rubocop -a
rubocop -A

fmt:
just --fmt
3 changes: 1 addition & 2 deletions docwatch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ 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 'nokogiri', '~> 1.10'
spec.add_runtime_dependency 'redcarpet', '~> 3.5'
spec.add_runtime_dependency 'require_all', '~> 3.0'
spec.add_runtime_dependency 'rouge', '~> 4.0'

spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.8'
spec.add_development_dependency 'simplecov', '~> 0'
end
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 eefd5fd

Please sign in to comment.