Skip to content

Conversation

kenhys
Copy link
Contributor

@kenhys kenhys commented Jun 27, 2025

Which issue(s) this PR fixes:
Fixes #

What this PR does / why we need it:

Enable Security & Performance check with RuboCop.

Guard code regression such as follows:

  Offenses:

  test/plugin/test_buf_file.rb:26:29: C: [Correctable] Performance/StringIdentifierArgument: Use :@write instead of "@write".
        instance_variable_set("@write", block)
                              ^^^^^^^^
  test/plugin/test_buf_file_single.rb:43:29: C: [Correctable] Performance/StringIdentifierArgument: Use :@write instead of "@write".
        instance_variable_set("@write", block)
                              ^^^^^^^^

Above trivial regression was introduced via #4986

Docs Changes:

N/A

Release Note:

N/A

@kenhys kenhys force-pushed the rubocop-minimum branch 2 times, most recently from 6c8c00d to 28f5a04 Compare June 27, 2025 07:55
@kenhys kenhys marked this pull request as ready for review June 27, 2025 07:55
@kenhys kenhys requested review from Watson1978 and daipom June 27, 2025 08:01
@kenhys kenhys force-pushed the rubocop-minimum branch from 28f5a04 to 4c1faa0 Compare June 27, 2025 08:02
Watson1978
Watson1978 previously approved these changes Jun 27, 2025
Copy link
Contributor

@Watson1978 Watson1978 left a comment

Choose a reason for hiding this comment

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

👍🏻

@daipom daipom mentioned this pull request Jun 27, 2025
@daipom
Copy link
Contributor

daipom commented Jun 27, 2025

Thanks!
I have fixed the regression.

@daipom daipom added this to the v1.19.0 milestone Jun 27, 2025
@daipom daipom added the CI Test/CI issues label Jun 27, 2025
@daipom
Copy link
Contributor

daipom commented Jun 27, 2025

This adds a check on security and performance, right?
Could you add that to the title and description of this PR?

@kenhys kenhys force-pushed the rubocop-minimum branch from 4c1faa0 to 3b22fa5 Compare June 27, 2025 08:28
@kenhys kenhys changed the title github: introduce RuboCop minimum rules github: introduce RuboCop minimum rules (Security & Performance check) Jun 27, 2025
@kenhys
Copy link
Contributor Author

kenhys commented Jun 27, 2025

Could you add that to the title and description of this PR?

Done!

daipom added a commit that referenced this pull request Jun 27, 2025
**Which issue(s) this PR fixes**: 
* For #5012

**What this PR does / why we need it**: 
Refactor code for #5012

**Docs Changes**:
Not needed.

**Release Note**: 
Not needed because this is new code for v1.19.

Signed-off-by: Daijiro Fukuda <[email protected]>
@daipom
Copy link
Contributor

daipom commented Jun 27, 2025

The regression has been fixed!
Could you rebase this?

Guard code regression such as follows:

  Offenses:

  test/plugin/test_buf_file.rb:26:29: C: [Correctable] Performance/StringIdentifierArgument: Use :@Write instead of "@Write".
        instance_variable_set("@Write", block)
                              ^^^^^^^^
  test/plugin/test_buf_file_single.rb:43:29: C: [Correctable] Performance/StringIdentifierArgument: Use :@Write instead of "@Write".
        instance_variable_set("@Write", block)
                              ^^^^^^^^

Signed-off-by: Kentaro Hayashi <[email protected]>
@kenhys kenhys force-pushed the rubocop-minimum branch from 3b22fa5 to aa3a697 Compare June 27, 2025 09:41
Copy link
Contributor

@daipom daipom left a comment

Choose a reason for hiding this comment

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

Thanks!

@daipom daipom merged commit 9ed4625 into fluent:master Jun 27, 2025
15 of 17 checks passed
@kenhys kenhys deleted the rubocop-minimum branch June 27, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Test/CI issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants