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

formatter indentation error when comment on the method args #12863

Closed
zw963 opened this issue Dec 21, 2022 · 2 comments · Fixed by #12908
Closed

formatter indentation error when comment on the method args #12863

zw963 opened this issue Dec 21, 2022 · 2 comments · Fixed by #12908
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:formatter

Comments

@zw963
Copy link
Contributor

zw963 commented Dec 21, 2022

Bug Report

Following is a code example, it has two indentation error.

      result = ControlClientReplyForStatusCommand.new(
        version: Procodile::VERSION,
        messages: @supervisor.messages,
        root: @supervisor.config.root,
      # app_name: @supervisor.config.app_name,  # 1. this comment line not indent with above line
)                                               # 2. ) not indent correct.

Check in following screenshot will more clearly.

image

@zw963 zw963 added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Dec 21, 2022
@zw963 zw963 changed the title formatter indentation error when comment on the method parameter formatter indentation error when comment on the method args Dec 21, 2022
@zw963
Copy link
Contributor Author

zw963 commented Jan 16, 2023

Hi, @straight-shoota , I found a new formatter issue which involves to comment on the lines,
maybe can be fix in one PR, please check. (if should create a new issue, please touch me)

Following code format correct.

module Test1
  begin
    raise "Error"
  rescue e : Exception
    puts "Error!"
  end
end

But, if comment the rescue lines out, end indentation error, like this.

module Test1
  begin
    raise "Error"
    # rescue e : Exception
    #   puts "Error!"
end
end

@straight-shoota
Copy link
Member

Yeah, that should be a different issue because it's a different bug. I've created #12964 for tracking it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:formatter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants