chore: add rubocop

This commit is contained in:
OCDkirby 2024-09-14 19:50:53 +10:00
parent 293463d89b
commit 55eac7a2a2
3 changed files with 74 additions and 0 deletions

41
.rubocop.yml Normal file
View File

@ -0,0 +1,41 @@
require:
- rubocop-performance
- rubocop-jekyll
- rubocop-md
inherit_gem:
rubocop-jekyll: .rubocop.yml
Markdown:
# Whether to run RuboCop against non-valid snippets
WarnInvalid: true
# Whether to lint codeblocks without code attributes
Autodetect: false
Style/FrozenStringLiteralComment:
Enabled: false
Layout/LineEndStringConcatenationIndentation: # (new in 1.18)
Enabled: true
Lint/EmptyInPattern: # (new in 1.16)
Enabled: true
Naming/InclusiveLanguage: # (new in 1.18)
Enabled: true
Style/InPatternThen: # (new in 1.16)
Enabled: true
Style/MultilineInPatternThen: # (new in 1.16)
Enabled: true
Style/QuotedSymbols: # (new in 1.16)
Enabled: true
Performance/ConcurrentMonotonicTime: # (new in 1.12)
Enabled: true
Performance/MapCompact: # (new in 1.11)
Enabled: true
Performance/MapMethodChain: # (new in 1.19)
Enabled: true
Performance/RedundantEqualityComparisonBlock: # (new in 1.10)
Enabled: true
Performance/RedundantSplitRegexpArgument: # (new in 1.10)
Enabled: true
Performance/StringIdentifierArgument: # (new in 1.13)
Enabled: true

View File

@ -39,3 +39,7 @@ gem "csv", "~> 3.3"
gem "base64", "~> 0.2.0" gem "base64", "~> 0.2.0"
gem "bigdecimal", "~> 3.1" gem "bigdecimal", "~> 3.1"
gem "rubocop-jekyll", "~> 0.12.0"
gem "rubocop-md", "~> 1.2"

View File

@ -14,6 +14,7 @@ GEM
tzinfo (~> 2.0, >= 2.0.5) tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7) addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0) public_suffix (>= 2.0.2, < 7.0)
ast (2.4.2)
base64 (0.2.0) base64 (0.2.0)
bigdecimal (3.1.8) bigdecimal (3.1.8)
coffee-script (2.4.1) coffee-script (2.4.1)
@ -233,15 +234,41 @@ GEM
octokit (4.25.1) octokit (4.25.1)
faraday (>= 1, < 3) faraday (>= 1, < 3)
sawyer (~> 0.9) sawyer (~> 0.9)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pathutil (0.16.2) pathutil (0.16.2)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
public_suffix (5.1.1) public_suffix (5.1.1)
racc (1.8.1) racc (1.8.1)
rainbow (3.1.1)
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.11.1) rb-inotify (0.11.1)
ffi (~> 1.0) ffi (~> 1.0)
regexp_parser (2.9.2)
rexml (3.3.7) rexml (3.3.7)
rouge (3.30.0) rouge (3.30.0)
rubocop (1.18.4)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.8.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-jekyll (0.12.0)
rubocop (~> 1.18.0)
rubocop-performance (~> 1.2)
rubocop-md (1.2.2)
rubocop (>= 1.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
rubyzip (2.3.2) rubyzip (2.3.2)
safe_yaml (1.0.5) safe_yaml (1.0.5)
sass (3.7.4) sass (3.7.4)
@ -275,6 +302,8 @@ DEPENDENCIES
http_parser.rb (~> 0.6.0) http_parser.rb (~> 0.6.0)
jekyll-feed (~> 0.12) jekyll-feed (~> 0.12)
minima (~> 2.5) minima (~> 2.5)
rubocop-jekyll (~> 0.12.0)
rubocop-md (~> 1.2)
tzinfo (>= 1, < 3) tzinfo (>= 1, < 3)
tzinfo-data tzinfo-data
wdm (~> 0.1.1) wdm (~> 0.1.1)