tools icon indicating copy to clipboard operation
tools copied to clipboard

🐛 CLI output for the formatter doesn't include line/column

Open nstepien opened this issue 2 years ago • 3 comments

Environment information

CLI:
  Version:              11.0.0
  Color support:        true

Platform:
  CPU Architecture:     x86_64
  OS:                   windows

Environment:
  ROME_LOG_DIR:         unset
  NO_COLOR:             unset
  TERM:                 unset

Rome Configuration:
  Status:               loaded
  Formatter disabled:   false
  Linter disabled:      false

Workspace:
  Open Documents:       0

Discovering running Rome servers...

Running Rome Server: 笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤笏≫煤

i The client isn't connected to any server but rage discovered this running Rome server.

Server:
  Version:              11.0.0
  Name:                 rome_lsp
  CPU Architecture:     x86_64
  OS:                   windows

Workspace:
  Open Documents:       0

Other Active Server Workspaces:

Workspace:
  Open Documents:       1
  Client Name:          Visual Studio Code
  Client Version:       1.73.1

Workspace:
  Open Documents:       4
  Client Name:          Visual Studio Code
  Client Version:       1.73.1

What happened?

  1. Rune rome ci .
  2. Notice that the output for the formatter vs linter are slightly different, the formatter is missing line/column numbers

For example:

.\path\to\file.tsx format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

vs

.\path\to\file.tsx:171:9 lint/a11y/useKeyWithClickEvents ━━━━━━━━━━━━━

Expected result

With the line/column numbers I should be able to click the full page to get the formatting issue.

Code of Conduct

  • [X] I agree to follow Rome's Code of Conduct

nstepien avatar Dec 07 '22 14:12 nstepien

@leops you might want to look at this one

ematipico avatar Dec 07 '22 16:12 ematipico

This is the intended behavior, formatting rewrites the file as a whole so there isn't a clear position inside of it that could correspond to the conceptual location of the diagnostic

leops avatar Dec 07 '22 16:12 leops

there isn't a clear position inside of it that could correspond to the conceptual location of the diagnostic

Even though there is a code diff? I'd be happy if even the first corresponding line number is added to the path.

nstepien avatar Dec 07 '22 16:12 nstepien

👋 @rome/staff please triage this issue by adding one of the following labels: S-Bug: confirmed, S-Planned , S-Wishlist or umbrella

github-actions[bot] avatar Dec 22 '22 12:12 github-actions[bot]