-
Notifications
You must be signed in to change notification settings - Fork 0
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
Tco46 linting #80
Merged
Merged
Tco46 linting #80
Conversation
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
No code changes have been made at this time. Config is not final. https://mitlibraries.atlassian.net/browse/TCO-45 https://mitlibraries.atlassian.net/browse/TCO-46 https://mitlibraries.atlassian.net/browse/TCO-60
`bundle exec rubocop -a app/models/`
`bundle exec rubocop -A app/models/`
`bundle exec rubocop -a app/controllers/`
`bundle exec rubocop -A app/controllers/`
`bundle exec rubocop -a app/graphql/`
`bundle exec rubocop -A app/graphql/` Note: reverted change to tacos_schema.rb that removed an example of how to do custom error handling that felt useful to keep in place even if it doesn't do anything yet.
`bundle exec rubocop -a test/`
`bundle exec rubocop -A test/`
`bundle exec rubocop -A lib/tasks/`
Note: removed changed to `suggested_resource.rake` as it caused a test failure
`bundle exec rubocop -A` Notes: auto cleanup on `app/dashboards/detector/suggested_resource_dashboard.rb` was incorrect as the initial code seemed a bit odd. I believe my manual fix is correct. Removed autofix for tacos_schema.rb as it removed a good example of how to handle errors
We have a fair amount of not-autofixable code we have already accepted into the repository. Rather than failing on the same code each time we run the linters, we can note which code is known to be not following our standards and only fail the linters on changed code. `bundle exec rubocop --auto-gen-config` is the way to do that.
Adds a few things the autogen config misses. Until we fix these, the autogen config will be annoying as it will keep losing these exclusions.
jazairi
approved these changes
Aug 12, 2024
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.
Reviewed as suggested, focusing on the config files and Makefile rather than the corrections that Rubocop made. Confirmed, also, that the rubocop_todo
file works as expected. Good idea to use that, btw; I'm not sure I was aware it was available.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of changes (please refer to commit messages for full details)
This introduces a rubocop configuration and performs a series of auto corrections, creates a todo list we can come back to over time, and makes a few manual changes (demonstrating how we'll update the todo list as we address code that currently does not match our linting standard).
Developer
Ticket(s)
https://mitlibraries.atlassian.net/browse/TCO-46
https://mitlibraries.atlassian.net/browse/TCO-60
Accessibility
all issues introduced by these changes have been resolved or opened
as new issues (link to those issues in the Pull Request details above)
Documentation
ENV
Stakeholders
Dependencies and migrations
YES dependencies are updated
NO migrations are included
Reviewer
Code
added technical debt.
Documentation
(not just this pull request message).
Testing