prettier / prettier/plugin-php

ugly comments in catch

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

Nobody has claimed this yet.

comments ugly
Dominant language
PHP
Stars
1.9k
Forks
139
PR merge metrics
No merged PRs in 30d

Description

Prettier 1.14.3

PHP Plugin 0.8.0

# Options (if any):
--single-quote

Input:

try {}
catch(
// comment
Exception
// comment
$foo
// comment
) {}

Output:

try {
} catch (// comment
Exception // comment
$foo) {
    // comment

}

Expected behavior:

Based on this https://github.com/prettier/prettier/pull/5202/files

Contributor guide

Open the contributing guide

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 with the PHP input and output examples in the issue, then read the referenced Prettier pull request for the intended comment behavior. Reproduce the formatting case and compare the result with the expected output; the issue does not name a file or test to update.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Bug
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.