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

Enable rubocop-on-rbs on protobuf #776

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Jan 21, 2025

rubocop log
Offenses:

gems/protobuf/3.10.3/_test/services.rbs:3:1: C: [Corrected] RBS/Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning.
gems/protobuf/3.10.3/field.rbs:7:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        attr_reader field: untyped
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:9:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def initialize: (untyped field) -> void
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:11:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def <<: (WriteElem? val) -> self?
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:13:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def []=: (int index, WriteElem? obj) -> WriteElem?
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:15:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def push: (WriteElem? val) -> self?
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:17:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def replace: (Array[WriteElem] val) -> self
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:19:9: C: [Corrected] RBS/Layout/CommentIndentation: Incorrect indentation detected (column 6 instead of 8).
        # Return a hash-representation of the given values for this field type.
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gems/protobuf/3.10.3/field.rbs:20:9: C: [Corrected] RBS/Layout/CommentIndentation: Incorrect indentation detected (column 6 instead of 8).
        # The value in this case would be an array.
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gems/protobuf/3.10.3/field.rbs:21:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def to_hash_value: () -> Array[untyped]
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:23:9: C: [Corrected] RBS/Layout/CommentIndentation: Incorrect indentation detected (column 6 instead of 8).
        # Return a hash-representation of the given values for this field type
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gems/protobuf/3.10.3/field.rbs:24:9: C: [Corrected] RBS/Layout/CommentIndentation: Incorrect indentation detected (column 6 instead of 8).
        # that is safe to convert to JSON.
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gems/protobuf/3.10.3/field.rbs:25:9: C: [Corrected] RBS/Layout/CommentIndentation: Incorrect indentation detected (column 6 instead of 8).
        # The value in this case would be an array.
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gems/protobuf/3.10.3/field.rbs:26:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def to_json_hash_value: () -> Array[untyped]
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:28:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def to_s: () -> String
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:30:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def unshift: (WriteElem? val) -> self?
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:32:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        private
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:34:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def normalize: (untyped value) -> untyped
^^^^^^^^
gems/protobuf/3.10.3/field.rbs:36:1: C: [Corrected] RBS/Layout/IndentationWidth: Use 6 (not 8) spaces for indentation.
        def raise_type_error: (untyped val) -> bot
^^^^^^^^
gems/protobuf/3.10.3/rpc_method.rbs:13:110: C: [Corrected] RBS/Layout/SpaceAroundBraces: Use one space before }.
      def initialize: (Symbol, singleton(Message), singleton(Message)) ?{ (instance) [self: instance] -> void} -> void
                                                                                                             ^

630 files inspected, 20 offenses detected, 20 offenses corrected

Copy link

@ksss Thanks for your contribution!

Please follow the instructions below for each change.
See also: https://github.com/ruby/gem_rbs_collection/blob/main/docs/CONTRIBUTING.md

Available commands

You can use the following commands by commenting on this PR.

  • /merge: Merge this PR if CI passes

protobuf

You changed RBS files for an existing gem.
This gem does not have reviewers. So you can merge this PR immediately if the CI passes.
We recommend you add yourself to the reviewers for this gem.

@ksss
Copy link
Collaborator Author

ksss commented Jan 21, 2025

/merge

@github-actions github-actions bot merged commit 5a0b9a2 into ruby:main Jan 21, 2025
6 checks passed
@ksss ksss deleted the protobuf-rubocop branch January 21, 2025 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant