Skip to content
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

Rubocop #7

Merged
merged 4 commits into from
Aug 31, 2020
Merged

Rubocop #7

merged 4 commits into from
Aug 31, 2020

Conversation

alextwoods
Copy link
Contributor

Description of changes:
Add rubocop with TargetRubyVersion: 1.9 + gemfile dependency on rubocop 0.50.0 (the last version that supports 1.9). Style relies on default rubocop styles for now.

Some minor style fixes from running rubocop --auto-correct

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alextwoods alextwoods requested review from graebm and mullermp August 31, 2020 19:25
aws-crt/Rakefile Outdated
sh "cmake --build #{build_dir}"
end
end

desc 'Move the compiled lib into bin'
task :bin => :compile do
task bin: :compile do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial: I have to say, I liked it better with the arrows
can we ignore that rule in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This style has been proposed a few times, eg: rubocop/rubocop#1437 and rubocop/rubocop#519 but hasn't really gained support.

I agree I prefer the => (aka hash rocket) for defining tasks as I find it more readable. I'll disable this check for just the Rakefile.

@@ -15,7 +15,6 @@ env:
RUN: ${{ github.run_id }}-${{ github.run_number }}

jobs:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a Github action to run rubocop!
Here's one I found: https://github.com/marketplace/actions/rubocop-linter-action
We could do this in a followup CR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - I'd like to add that as a check. There are currently a few rubocop violations that couldn't be auto-corrected. I was waiting for you're refactor to move things around before fixing them + adding a github action.

@alextwoods alextwoods merged commit 27b015b into master Aug 31, 2020
@alextwoods alextwoods deleted the rubocop branch August 31, 2020 20:49
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.

2 participants