Skip to content

Auditing: Add rails_best_practices checks to Travis build, do cleanup#2703

Merged
kevinrobinson merged 6 commits into
masterfrom
feature/rails-best-practices-tooling
Nov 6, 2019
Merged

Auditing: Add rails_best_practices checks to Travis build, do cleanup#2703
kevinrobinson merged 6 commits into
masterfrom
feature/rails-best-practices-tooling

Conversation

@kevinrobinson
Copy link
Copy Markdown
Contributor

@kevinrobinson kevinrobinson commented Nov 6, 2019

This adds a subset of https://github.com/flyerhzm/rails_best_practices, does cleanup on the items it found, and adds the check to the Travis build.

These include:

  • removing unused methods
  • calling ActiveRecord operations and ignoring the return value (change to bang methods)
  • removed some old rake tasks related to schools (synced differently now)

Some other config was just noise, so those are disabled here in rails_best_practices.yml.

EDIT: I also looked at UseBeforeFilterCheck which seems potential useful but is too noisy.

This also updates administrate to be more explicit, and limit open routes as helpfully pointed out by RestrictAutoGeneratedRoutesCheck.

# removed
admin/educators#create
admin/educators#new
admin/educators#destroy

# kept, explicitly now
admin/educators#index
admin/educators#show
admin/educators#edit
admin/educators#update

@kevinrobinson
Copy link
Copy Markdown
Contributor Author

example of how failures look in the build:
Screen Shot 2019-11-06 at 3 15 33 PM

@kevinrobinson
Copy link
Copy Markdown
Contributor Author

selfie

@kevinrobinson kevinrobinson merged commit 8fd95a3 into master Nov 6, 2019
@kevinrobinson kevinrobinson deleted the feature/rails-best-practices-tooling branch November 6, 2019 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant