You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 31, 2023. It is now read-only.
🐛 Rome returns non-zero exit code when called with excluded filename #4681
CLI:
Version: 12.1.3
Color support: true
Platform:
CPU Architecture: x86_64
OS: linux
Environment:
ROME_LOG_DIR: unset
NO_COLOR: unset
TERM: "xterm-256color"
JS_RUNTIME_VERSION: "v18.7.0"
JS_RUNTIME_NAME: "node"
NODE_PACKAGE_MANAGER: "yarn/3.6.0"
Rome Configuration:
Status: Loaded successfully
Formatter disabled: false
Linter disabled: false
Organize imports disabled: true
VCS disabled: true
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: 12.1.3
Name: rome_lsp
CPU Architecture: x86_64
OS: linux
Workspace:
Open Documents: 0
Other Active Server Workspaces:
Workspace:
Open Documents: 5
Client Name: Visual Studio Code
Client Version: 1.79.2
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
<Snipped to not include proprietary code information>
What happened?
Setup rome to exclude a certain file pattern, e.g. *.generated.ts
attempt to run rome on a set of files including at least one that is excluded, e.g. rome check --apply foo.ts bar.generated.ts
Rome returns an io/InternalError and exit code of 1.
echo $./api.generated.ts lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ The file ./api.generated.ts was ignored
Fixed 1 file(s) in 676µs
Skipped 1 file(s)
internalError/io ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ No files were processed in the specified paths.
$ echo $?
1
Note this is a bit of a contrived example for simplicity of replication, in reality this is a common occurrence with e.g. lint-staged
Expected result
Rome should skip the excluded file gracefully and continue linting the remaining files returning a status code indicating whether the linting/formatting succeeded on the non-excluded files.
I encountered an issue here related to lint-staged, but now that I'm experimenting with more trivial examples calling rome directly it's less clear that what I have described above is comprehensive as reproduction steps. I'll take another crack at identifying precisely the scenarios where rome's exit code doesn't align with expectations and/or breaks conventions ecosystem tooling is expecting.
Environment information
What happened?
rome check --apply foo.ts bar.generated.tsNote this is a bit of a contrived example for simplicity of replication, in reality this is a common occurrence with e.g.
lint-stagedExpected result
Rome should skip the excluded file gracefully and continue linting the remaining files returning a status code indicating whether the linting/formatting succeeded on the non-excluded files.
Code of Conduct