From de773a5033ca72a1ead628da39976be7fbfc6310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Mari=C3=A9?= Date: Thu, 4 Apr 2024 01:54:19 +0200 Subject: [PATCH] linting --- .github/dependabot.yml | 24 ++++++++++++------------ .rubocop.yml | 8 ++++++++ Gemfile | 1 + bin/rspec | 10 +++++++--- bin/times | 10 +++++++--- package.json | 3 +++ spec/parallel_spec.rb | 2 ++ spec/spec_helper.rb | 2 ++ 8 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 .rubocop.yml create mode 100644 package.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9e58267..8b92e40 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,15 +1,15 @@ --- version: 2 updates: -- directory: "/" - package-ecosystem: github-actions - schedule: - interval: daily -- directory: "/" - package-ecosystem: npm - schedule: - interval: daily -- directory: "/" - package-ecosystem: bundler - schedule: - interval: daily + - directory: "/" + package-ecosystem: github-actions + schedule: + interval: daily + - directory: "/" + package-ecosystem: npm + schedule: + interval: daily + - directory: "/" + package-ecosystem: bundler + schedule: + interval: daily diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..ded59b1 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,8 @@ +inherit_gem: + rubocop-rails-omakase: rubocop.yml + +Layout/SpaceInsideArrayLiteralBrackets: + Enabled: false + +Performance/UnfreezeString: + Enabled: false diff --git a/Gemfile b/Gemfile index abaf982..f15cc75 100644 --- a/Gemfile +++ b/Gemfile @@ -8,3 +8,4 @@ ruby "3.3.0" gem "dorian-times" gem "rspec" +gem "rubocop-rails-omakase" diff --git a/bin/rspec b/bin/rspec index cb53ebe..c42c1a9 100755 --- a/bin/rspec +++ b/bin/rspec @@ -13,11 +13,15 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + if File.read(bundle_binstub, 300).include?( + "This file was generated by Bundler" + ) load(bundle_binstub) else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + abort( + "Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again." + ) end end diff --git a/bin/times b/bin/times index df9ea15..f69ae55 100755 --- a/bin/times +++ b/bin/times @@ -13,11 +13,15 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + if File.read(bundle_binstub, 300).include?( + "This file was generated by Bundler" + ) load(bundle_binstub) else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + abort( + "Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again." + ) end end diff --git a/package.json b/package.json new file mode 100644 index 0000000..010bd79 --- /dev/null +++ b/package.json @@ -0,0 +1,3 @@ +{ + "license": "MIT" +} \ No newline at end of file diff --git a/spec/parallel_spec.rb b/spec/parallel_spec.rb index 07044ac..5d3d8b1 100644 --- a/spec/parallel_spec.rb +++ b/spec/parallel_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" RSpec.describe "parallel" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a579642..397e6d6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "rspec"