tools
tools copied to clipboard
📎 New option to silent unhandled files
Description
From https://github.com/rome/tools/discussions/4267
At the moment, when Rome encounters a file that can't handle, a diagnostic is emitted.
We want to create a new option inside the configuration option and a new CLI argument.
Configuration
{
"files": {
"ignoreUnknown": true
}
}
CLI
rome ci ./src --files-ignore-unknown
Any additional help on this?
Implementing this feature require a bit of work, so don't worry if you feel discouraged.
Here's where I think we should implement the feature.
- This is where we throw a diagnostics in the CLI
https://github.com/rome/tools/blob/ab3524889a0dd82d640797cbd2c5b2fadf246d70/crates/rome_cli/src/execute/process_file.rs#L153-L157
- This means that when we request the
FileFeatures
for a file from the workspace, we need to handle that by checking the capabilities and the settings:
https://github.com/rome/tools/blob/ab3524889a0dd82d640797cbd2c5b2fadf246d70/crates/rome_service/src/workspace/server.rs#L199-L201
So, we need the following:
This option was implemented by #4547