-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fbuys/207 rubocop and standardrb #208
Conversation
e3a31e9
to
71977fe
Compare
Includes - CI github workflow - Rubocop and Standard ruby gems - Rubocop config To automate linting and code standards. RuboCop is a Ruby static code analyzer (a.k.a. linter) and code formatter. Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide. StandardRB is built on top of RuboCop with some specific configurations for RuboCop's cops. Further reading: - https://docs.rubocop.org/rubocop/1.18/index.html - https://rubystyle.guide/ - https://github.com/testdouble/standard - https://github.com/testdouble/standard/blob/main/config/base.yml
7287f5d
to
c029a5b
Compare
So we can ignore the non-safe linting errors for now. We can open additional issues to fix the remaining linting issues. CI will use the todo file and therefore not fail while we have time to fix the remaining linting issues. IDE integration should still report on all the errors until we fix them.
561e89d
to
fa11ae9
Compare
To autocorrect all safe linting errors. The remaining errors are in the todo file so we can look at it in the future.
fa11ae9
to
014eb17
Compare
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.
🥦 rubocop -A --safe fixes only
ruby-version: '2.7' | ||
- run: gem install rubocop bundler | ||
- run: bundle install | ||
- run: bundle exec rubocop -c .rubocop_with_todo.yml |
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.
🥦 CI uses todo config so it excludes unsafe linting errors.
@@ -0,0 +1,439 @@ | |||
# This configuration was generated by |
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.
🥦 File contains the list of cops that we need to fix when we have time
$ t display | ||
|
||
Submit bugs and feature requests to http://github.com/samg/timetrap/issues | ||
USAGE = <<~EOF |
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.
🥦 ~ removes the padding
cf40efb
to
1e87883
Compare
Description
Includes
To automate linting and code standards.
RuboCop is a Ruby static code analyzer (a.k.a. linter) and code formatter.
Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide.
StandardRB is built on top of RuboCop with some specific configurations for RuboCop's cops.
Further reading:
A
todo
config file was added so we can ignore the non-safe linting errors for now.We can open additional issues to fix the remaining linting issues.
CI will use the todo file and therefore not fail while we have time to
fix the remaining linting issues.
IDE integration should still report on all the errors until we fix them.
Motivation and Context
Closes: #207
This change makes it easy for all contributors to maintain the same coding standard.
This should make contributing easier too.
How Has This Been Tested?
I have added a CI workflow and if the CI workflow passes then it means we have adhered to the required linting standard.
Screenshots (if appropriate):
Types of changes
Checklist: