-
Notifications
You must be signed in to change notification settings - Fork 657
Add .gitignore support #2492
Comments
What are the requirements of My concern is that we should not ignore files that are ignored by the VCS. Mainly because Rome is not a VCS and there's value in processing files that are ignored. It can provide value for operations that involve VCS, so we should carefully understand the when and how. |
IMO we should revisit this along with #2493. It's an extremely common use case and has prior art in ripgrep and fd. |
Should we add support to of We don't have support of a configuration file yet, but once we do, we could add support for |
Would that be the ideal setup? I'm not a huge fan of dprint requiring a config file to use the formatter. While a |
What if:
|
That could work, although we'd have to figure out a way to make that clear to users. It might be very confusing to have Rome obey the .gitignore, then when a |
I've been thinking more about this, and I am more convinced that we should not supported this out of the box (maybe behind flag). The examples you mentioned are different from us (they don't write files, for example). If you have examples of CLIs similar to Rome (formatter, bundler, test framework, linter, etc.), that would build your case. Still, I think it should an opt in feature, if we really want to support it. |
Closing, ignored files will be part of the configuration file |
Hi, just wanted to voice my personal experience. I just downloaded rome to try it out, and was surprised when it tried to format files that are in my .gitignore. I find it mildly annoying that I need to duplicate my .gitignore in my rome config. Feel free to ignore me, I'm just providing a bit of unsolicited feedback. :) |
@IanVS Yeah this is good feedback. I think we should likely consider doing this. |
does #2493 help here? |
Do you know if other tools - e.g. prettier, eslint, esbuild, etc. - ignore files inside the |
Prettier allows passing an |
A lot of the modern Rust tools tend to respect |
Yeah, I think it makes sense to try to cover the majority of the cases and meet the users halfway. Still, I think we should provide an option to opt out this feature - if it becomes the default. I know it seems weird, but as a web developer - and especially a tool developer - many times I wanted to run locally the very tool on some files while keeping them ignored in |
👋 @rome/staff please triage this issue by adding one of the following labels: |
There is currently a similar discussion going on in prettier... |
Yeah, it makes sense to add support for it. My only concern was a way to opt out of this feature. Other than that, let us make a PR to support it! |
Currently we have hard coded folders that we ignore. We should change that to follow the .gitignore
The text was updated successfully, but these errors were encountered: