-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rubocop to Github CI #117
Open
chriszimmerman
wants to merge
12
commits into
main
Choose a base branch
from
SA-113-rubocop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5175936
Installs rubocop gem
chriszimmerman 69f8ff5
Installs rubocop-rails gem
chriszimmerman 9504d5a
Adds rubocop-rails gem and adds some rules for rubocop
chriszimmerman f9c1bd2
Runs "rubocop - A" command to apply rubocop suggestions
chriszimmerman 0f641ad
Adds more rubocop rules to fix offenses. We can make these more stric…
chriszimmerman dafb4ab
Some manual fixes to correct Rubocop offenses
chriszimmerman 87d4c91
Adds more ignore rules that we can tighten up later
chriszimmerman b3bf114
More Rubocop fixes
chriszimmerman 2a9ed8e
Adds rubocop step to CI github action
chriszimmerman 3b28c6b
Undoes incorrect rails association and adds ignore rule
chriszimmerman 9fc3f96
Trying to get Rubocop to run on CI
chriszimmerman 20cfa1b
Trying again to get Rubocop running
chriszimmerman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,18 @@ | ||
require: | ||
- rubocop-rails | ||
Style/Documentation: | ||
Enabled: false | ||
Layout/LineLength: | ||
Enabled: false | ||
Metrics/BlockLength: | ||
IgnoredMethods: | ||
- test | ||
- configure | ||
Metrics/MethodLength: | ||
Max: 40 | ||
Rails/BulkChangeTable: | ||
Enabled: false | ||
Rails/HasManyOrHasOneDependent: | ||
Enabled: false | ||
Rails/HasAndBelongsToMany: | ||
Enabled: false |
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,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# 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_relative 'config/application' | ||
|
||
Rails.application.load_tasks |
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,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
class Channel < ActionCable::Channel::Base | ||
end | ||
|
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,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
class Connection < ActionCable::Connection::Base | ||
end | ||
|
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,34 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
class Admin::PasswordsController < Devise::PasswordsController | ||
# GET /resource/password/new | ||
# def new | ||
# super | ||
# end | ||
module Admin | ||
class PasswordsController < Devise::PasswordsController | ||
# GET /resource/password/new | ||
# def new | ||
# super | ||
# end | ||
|
||
# POST /resource/password | ||
# def create | ||
# super | ||
# end | ||
# POST /resource/password | ||
# def create | ||
# super | ||
# end | ||
|
||
# GET /resource/password/edit?reset_password_token=abcdef | ||
# def edit | ||
# super | ||
# end | ||
# GET /resource/password/edit?reset_password_token=abcdef | ||
# def edit | ||
# super | ||
# end | ||
|
||
# PUT /resource/password | ||
# def update | ||
# super | ||
# end | ||
# PUT /resource/password | ||
# def update | ||
# super | ||
# end | ||
|
||
# protected | ||
# protected | ||
|
||
# def after_resetting_password_path_for(resource) | ||
# super(resource) | ||
# end | ||
# def after_resetting_password_path_for(resource) | ||
# super(resource) | ||
# end | ||
|
||
# The path used after sending reset password instructions | ||
# def after_sending_reset_password_instructions_path_for(resource_name) | ||
# super(resource_name) | ||
# end | ||
# The path used after sending reset password instructions | ||
# def after_sending_reset_password_instructions_path_for(resource_name) | ||
# super(resource_name) | ||
# end | ||
end | ||
end |
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,33 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
class Admin::SessionsController < Devise::SessionsController | ||
# before_action :configure_sign_in_params, only: [:create] | ||
module Admin | ||
class SessionsController < Devise::SessionsController | ||
# before_action :configure_sign_in_params, only: [:create] | ||
|
||
# GET /resource/sign_in | ||
# def new | ||
# super | ||
# end | ||
# GET /resource/sign_in | ||
# def new | ||
# super | ||
# end | ||
|
||
# POST /resource/sign_in | ||
def create | ||
super | ||
@current_person ||= PresentablePerson.build(resource, view_context) | ||
after_sign_in_path_for(resource) | ||
end | ||
# POST /resource/sign_in | ||
def create | ||
super | ||
@current_person ||= PresentablePerson.build(resource, view_context) | ||
after_sign_in_path_for(resource) | ||
end | ||
|
||
# DELETE /resource/sign_out | ||
# def destroy | ||
# super | ||
# end | ||
# DELETE /resource/sign_out | ||
# def destroy | ||
# super | ||
# end | ||
|
||
protected | ||
protected | ||
|
||
def after_sign_in_path_for(resource) | ||
people_path | ||
end | ||
def after_sign_in_path_for(_resource) | ||
people_path | ||
end | ||
|
||
# If you have extra params to permit, append them to the sanitizer. | ||
# def configure_sign_in_params | ||
# devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute]) | ||
# end | ||
end | ||
# If you have extra params to permit, append them to the sanitizer. | ||
# def configure_sign_in_params | ||
# devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute]) | ||
# end | ||
end | ||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally like to minimize the number of diffs when we're introducing rubocop to a repo at first. If we want to go with single quotes, we can create a PR afterwards that introduces that single rule change so that reviewing the diff is very simple.