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

GraphQL/Ordered* cops doesn't work correctly w/ heredoc #108

Closed
RasimKhusaenov opened this issue Jan 10, 2023 · 0 comments
Closed

GraphQL/Ordered* cops doesn't work correctly w/ heredoc #108

RasimKhusaenov opened this issue Jan 10, 2023 · 0 comments

Comments

@RasimKhusaenov
Copy link
Contributor

RasimKhusaenov commented Jan 10, 2023

GraphQL/Ordered* cops autocorrection doesn't work correctly in classes with heredoc.

How it works

Before:

module Resolvers
  class Test < Resolvers::Base
    argument :test_2, Int
    argument :test_1, Int,
      description: <<~DESC
        heredoc example
      DESC
  end
end

After:

module Resolvers
  class Test < Resolvers::Base
    argument :test_1, Int,
      description: <<~DESC
        argument :test_2, Int
            heredoc example
      DESC
  end
end

Expected:

module Resolvers
  class Test < Resolvers::Base
    argument :test_1, Int,
      description: <<~DESC
         heredoc example
      DESC
    argument :test_2, Int
  end
end
Darhazer added a commit to Darhazer/rubocop-graphql that referenced this issue Jan 13, 2023
Darhazer added a commit to Darhazer/rubocop-graphql that referenced this issue Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant