-
Notifications
You must be signed in to change notification settings - Fork 15
Fix rubocop action: use rubocop 1.50.0 and ruby 3.2.2 (but TargetRubyVersion set to 2.5) and do not use deprecated GHA set-output #222
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
Changes from all commits
8d6772a
358da78
79a0ee8
2c68f5e
d4e1b7b
820dda5
a5a31bd
52e8c37
4be47aa
8dfa3bb
189e7c7
83025e3
ae2e377
2835736
773ae06
e41867c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ on: | |
| - 'update_eplus_compare/**/*' | ||
| - 'weatherdata/**/*' | ||
| - 'model/refbuildingtests/measures/**/*' | ||
| - 'convert_ruby_to_python.rb' | ||
|
|
||
| jobs: | ||
| rubocop: | ||
|
|
@@ -31,7 +32,7 @@ jobs: | |
|
|
||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '2.7' | ||
| ruby-version: '3.2.2' | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
|
|
@@ -43,6 +44,6 @@ jobs: | |
| with: | ||
| autocorrect: true | ||
| commit-auto-correct: true | ||
| rubocop-version: 0.81.0 | ||
| rubocop-version: 1.50.0 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. USe rubocop 1.50.0. So it's the same as the Current OpenStudio CLI |
||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| # Where a Cop is not listed, it uses the Rubocop defaults. | ||
|
|
||
| AllCops: | ||
| TargetRubyVersion: 2.5 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Configure TargetRubyVersion to 2.5 so we can still run backward in time down to OpenStudio 3.0.0 at least |
||
| NewCops: enable | ||
| Exclude: | ||
| - 'doc/**/*' | ||
|
|
@@ -14,6 +15,7 @@ AllCops: | |
| - 'update_eplus_compare/**/*' | ||
| - 'weatherdata/**/*' | ||
| - 'model/refbuildingtests/measures/**/*' | ||
| - 'convert_ruby_to_python.rb' | ||
|
|
||
| # inherit_from: | ||
| # - http://s3.amazonaws.com/openstudio-resources/styles/rubocop.yml | ||
|
|
@@ -85,6 +87,9 @@ Metrics/BlockNesting: | |
| #CountComments: false | ||
| #Severity: warning | ||
|
|
||
| Metrics/CollectionLiteralLength: | ||
| Enabled: false | ||
|
Comment on lines
+90
to
+91
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New config |
||
|
|
||
| Metrics/CyclomaticComplexity: | ||
| Max: 60 | ||
| Severity: warning | ||
|
|
@@ -96,7 +101,7 @@ Metrics/CyclomaticComplexity: | |
| # Severity: warning | ||
|
|
||
| Metrics/MethodLength: | ||
| Max: 350 | ||
| Max: 600 | ||
|
Comment on lines
103
to
+104
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tweak |
||
| CountComments: false | ||
| Severity: warning | ||
|
|
||
|
|
@@ -124,6 +129,10 @@ Style/ClassAndModuleChildren: | |
| Style/ClassVars: | ||
| Enabled: false | ||
|
|
||
| # Don't force an if to a case | ||
| Style/CaseLikeIf: | ||
| Enabled: false | ||
|
Comment on lines
+132
to
+134
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New config |
||
|
|
||
| # Allow this syntax -- do not autocorrect. | ||
| # a = if true | ||
| # 1 | ||
|
|
||
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.
Use 3.2.2 in the action