We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
GraphQL/OrderedFields
class SomeType < Types::BaseObject field :id, Integer field :some_field, Integer field :field_too, Integer field :field, Integer end
leads to
$ bundle exec rubocop --only GraphQL/OrderedFields -ad app/graphql/types/some_type.rb … An error occurred while GraphQL/OrderedFields cop was inspecting /…/app/graphql/types/some_type.rb:1:0. Parser::Source::TreeRewriter detected clobbering …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter.rb:427:in `trigger_policy' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter.rb:414:in `enforce_policy' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:225:in `call' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:225:in `call_enforcer_for_merge' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:216:in `merge' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:104:in `do_combine' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:117:in `place_in_hierarchy' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:131:in `block in combine_children' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:130:in `each' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:130:in `inject' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:130:in `combine_children' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:221:in `merge' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:104:in `do_combine' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter/action.rb:30:in `combine' …/gems/parser-3.0.3.2/lib/parser/source/tree_rewriter.rb:143:in `merge!' …/gems/rubocop-1.24.0/lib/rubocop/cop/base.rb:291:in `apply_correction' …/gems/rubocop-1.24.0/lib/rubocop/cop/base.rb:375:in `attempt_correction' …/gems/rubocop-1.24.0/lib/rubocop/cop/base.rb:356:in `use_corrector' …/gems/rubocop-1.24.0/lib/rubocop/cop/base.rb:350:in `correct' …/gems/rubocop-1.24.0/lib/rubocop/cop/base.rb:127:in `add_offense' …/gems/rubocop-graphql-0.12.0/lib/rubocop/cop/graphql/ordered_fields.rb:60:in `register_offense' …/gems/rubocop-graphql-0.12.0/lib/rubocop/cop/graphql/ordered_fields.rb:47:in `block in on_class' …/gems/rubocop-graphql-0.12.0/lib/rubocop/cop/graphql/ordered_fields.rb:100:in `block in field_declarations' …/gems/rubocop-ast-1.15.1/lib/rubocop/ast/node/mixin/descendence.rb:106:in `block in visit_descendants' …
on
$ bundle exec rubocop -V 1.24.0 (using Parser 3.0.3.2, rubocop-ast 1.15.1, running on ruby 3.1.0 x86_64-linux)
with rubocop-graphql-0.12.0 (not sure if it's rubocop or rubocop-graphql but that it's not showing in rubocop -V).
rubocop-graphql-0.12.0
rubocop -V
The text was updated successfully, but these errors were encountered:
I could reproduce the issue locally but didn't come with the fix yet. Thanks for the report!
Sorry, something went wrong.
Fix auto-correction when there are multiple offenses detected (Dmitry…
5fe9574
…Tsepelev#63)
Fix auto-correction when there are multiple offenses detected (#63) (#86
7d450df
)
Successfully merging a pull request may close this issue.
leads to
on
with
rubocop-graphql-0.12.0
(not sure if it's rubocop or rubocop-graphql but that it's not showing inrubocop -V
).The text was updated successfully, but these errors were encountered: