Conversation
…e to run tests backward) Avoid the "message": "Lint/Syntax: Lint/Syntax: unexpected token tRBRACK\n(Using Ruby 2.3 parser; configure using `TargetRubyVersion` parameter, under `AllCops`) (Correctable)",
jmarrec
commented
Jun 11, 2025
| # Where a Cop is not listed, it uses the Rubocop defaults. | ||
|
|
||
| AllCops: | ||
| TargetRubyVersion: 2.5 |
Contributor
Author
There was a problem hiding this comment.
Configure TargetRubyVersion to 2.5 so we can still run backward in time down to OpenStudio 3.0.0 at least
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '2.7' | ||
| ruby-version: '3.2.2' |
Contributor
Author
There was a problem hiding this comment.
Use 3.2.2 in the action
| 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.
USe rubocop 1.50.0. So it's the same as the Current OpenStudio CLI
Comment on lines
+89
to
+91
| Metrics/CollectionLiteralLength: | ||
| Enabled: false |
Comment on lines
102
to
+104
| Metrics/MethodLength: | ||
| Max: 350 | ||
| Max: 600 |
Comment on lines
+131
to
+134
| # Don't force an if to a case | ||
| Style/CaseLikeIf: | ||
| Enabled: false |
…rics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/ParameterLists
```
test_helpers.rb:512:55: E: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use compare_eui: true instead of compare_eui = true.
def postprocess_out_osw_and_copy(out_osw, cp_out_osw, compare_eui = true)
^^^^^^^^^^^^^^^^^^
```
Contributor
Author
|
Ok, checked manually that the results are the same for changed tests before and after this PR. merging. |
This file contains hidden or 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
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.
This was long overdue, we have been getting failures on all PRs for several months
Note: I updated rubocop-composite-actions
Update to use Ruby 3.2.2 and Rubocop 1.50.0 (matches current OS SDK version), but TargetRubyVersion 2.5 (so we can run backwards down to OS SDK 3.0.0)
Fix all offenses with this newer rubocop
Link to the Ubuntu 22.04 .deb installer to use for CI Testing. If not set, it will default to latest official release.
[OpenStudio Installer]: http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/PR-5426/OpenStudio-3.10.0-rc1%2B1191f7e597-Ubuntu-22.04-x86_64.deb