JuliaDiff / JuliaDiff/BlueStyle

Indentation of comments in try catch blocks

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
519
Forks
34
PR merge metrics
No merged PRs in 30d

Description

Hi!

Currently, if you try to leave a comment before a catch statement, it will be indented. This is a bit of an eyesore when you're trying to comment on what sort of error you're catching for instance. Here is what I mean:

# I want to do thing
try
    thing
    # This comment is indented no matter what :(
catch e
    something_else
end

And here is what would look better in my opinion:

# I want to do thing
try
    thing

# This comment is indented no matter what :(
catch e
    something_else
end

Or perhaps without the newline before the comment.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the BlueStyle documentation or guidance covering comments around Julia try/catch blocks. Compare the current indentation with the two alternatives shown in the issue, clarify which convention is preferred, and update the relevant guidance with an example. No file or test is named, so completion depends on identifying the appropriate documentation entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.