Skip to content

Conversation

@jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Jun 11, 2025

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

@jmarrec jmarrec self-assigned this Jun 11, 2025
@jmarrec jmarrec added Other PR type: Something else, like maintenance of the repo, or just committing test results Developer Issue labels Jun 11, 2025
@jmarrec jmarrec changed the title ignore convert_ruby_to_python + note that I updated rubocop-composite-actions Fix rubocop action Jun 11, 2025
…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 jmarrec changed the title Fix rubocop action 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 Jun 11, 2025
# Where a Cop is not listed, it uses the Rubocop defaults.

AllCops:
TargetRubyVersion: 2.5
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.2.2'
Copy link
Contributor Author

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

autocorrect: true
commit-auto-correct: true
rubocop-version: 0.81.0
rubocop-version: 1.50.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Comment on lines +89 to +91
Metrics/CollectionLiteralLength:
Enabled: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New config

Comment on lines 102 to +104
Metrics/MethodLength:
Max: 350
Max: 600
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tweak

Comment on lines +131 to +134
# Don't force an if to a case
Style/CaseLikeIf:
Enabled: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New config

jmarrec added 8 commits June 11, 2025 13:11
…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)
                                                      ^^^^^^^^^^^^^^^^^^
```
@jmarrec
Copy link
Contributor Author

jmarrec commented Jun 11, 2025

Ok, checked manually that the results are the same for changed tests before and after this PR. merging.

@jmarrec jmarrec merged commit 76129c0 into develop Jun 11, 2025
2 of 3 checks passed
@jmarrec jmarrec deleted the fix_rubocop branch June 11, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Developer Issue Other PR type: Something else, like maintenance of the repo, or just committing test results

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants