rome / tools

Unified developer tools for JavaScript, TypeScript, and the web
https://docs.rome.tools/
MIT License
23.75k stars 660 forks source link

πŸ› Bug with `noUnreachable` and `finally` block #3654

Closed nstepien closed 1 year ago

nstepien commented 1 year ago

Environment information

CLI:
  Version:              10.0.1
  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:   true
  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:              10.0.1
  Name:                 rome_lsp
  CPU Architecture:     x86_64
  OS:                   windows

Workspace:
  Open Documents:       0

Other Active Server Workspaces:

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

Rome Server Log:

! Please review the content of the log file before sharing it publicly as it may contain sensitive information:
  * Path names that may reveal your name, a project name, or the name of your employer.
  * Source code

β”œβ”€11239782ms INFO rome_lsp::server Starting Rome Language Server...

What happened?

  1. Open this playground
  2. Notice that testFAIL has a lint/diagnostic issue, while testOK does not.

Expected result

return null; in testFail is reachable, noUnreachable should not mark this as a lint issue.

Code of Conduct

ematipico commented 1 year ago

@nstepien could you please create a new playground and link it? Unfortunately the one provided doesn't work anymore because we changed the URL of the playground.

nstepien commented 1 year ago

@ematipico I've updated the link in the opening comment.