From 1737122c80a4be28a7153347a79dc8a6046e5d30 Mon Sep 17 00:00:00 2001 From: rebuilt Date: Fri, 8 Jul 2022 19:08:01 -0700 Subject: [PATCH] Add static code analysis configuration files: rubocop, reek, erb-lint --- .erb-lint.yml | 11 +++++++++++ .reek.yml | 4 ++++ .rubocop.yml | 13 +++++++++++++ Gemfile.lock | 6 ++++-- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .erb-lint.yml create mode 100644 .reek.yml create mode 100644 .rubocop.yml diff --git a/.erb-lint.yml b/.erb-lint.yml new file mode 100644 index 00000000..76b6772c --- /dev/null +++ b/.erb-lint.yml @@ -0,0 +1,11 @@ +--- +EnableDefaultLinters: true +linters: + ErbSafety: + enabled: true + better_html_config: .better-html.yml + Rubocop: + enabled: true + rubocop_config: + inherit_from: + - .rubocop.yml diff --git a/.reek.yml b/.reek.yml new file mode 100644 index 00000000..c6477ff6 --- /dev/null +++ b/.reek.yml @@ -0,0 +1,4 @@ +--- +detectors: + InstanceVariableAssumption: + enabled: false diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..407cae41 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,13 @@ +inherit_from: ~/.rubocop.yml + +Lint/ShadowingOuterLocalVariable: + Enabled: false + +Metrics/ClassLength: + Enabled: false + +Style/Documentation: + Enabled: false + + + diff --git a/Gemfile.lock b/Gemfile.lock index 6e5cc9d6..d308b000 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -145,6 +145,7 @@ GEM thor (>= 0.14, < 2.0) jsbundling-rails (1.0.2) railties (>= 6.0.0) + json (2.6.2) jwt (1.5.6) launchy (2.5.0) addressable (~> 2.7) @@ -264,7 +265,8 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.11.0) - rubocop (1.30.1) + rubocop (1.31.2) + json (~> 2.3) parallel (~> 1.10) parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) @@ -313,7 +315,7 @@ GEM concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (2.1.0) + unicode-display_width (2.2.0) uniform_notifier (1.16.0) warden (1.2.9) rack (>= 2.0.9)