-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e4deea
commit c84f647
Showing
5 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
require: rubocop-rails | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.5 | ||
NewCops: enable | ||
Include: | ||
- '**/*.rb' | ||
Exclude: | ||
- vendor/**/* | ||
- .vendor/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
# Add your own tasks in files placed in lib/tasks ending in .rake, | ||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | ||
|
||
require_relative 'config/application' | ||
require 'rubocop/rake_task' | ||
RuboCop::RakeTask.new(:rubocop) do |task| | ||
# These make the rubocop experience maybe slightly less terrible | ||
task.options = ['-D', '-S', '-E'] | ||
|
||
Rails.application.load_tasks | ||
# Use Rubocop's Github Actions formatter if possible | ||
task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true' | ||
end | ||
# check if the rails configuration exists and load the tasks | ||
if File.file?('config/hdm.yml') | ||
require_relative 'config/application' | ||
Rails.application.load_tasks | ||
else | ||
puts "Not loading Rails specific tasks because config/hdm.yml is missing!" | ||
end |