Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_fs): Allow to ignore patterns to symbolic links (symlinks) #4166

Merged
merged 7 commits into from
Mar 5, 2023

Conversation

realtimetodie
Copy link
Contributor

Fixes an issue where Rome could not ignore patterns to symbolic links (symlinks) during traversal.

Example - A rome.json configuration file with the files.ignore option

{
  "files": {
    "ignore": [
      "symlink/**/*.ts",
    ]
  }
}

This implementation works for simple use cases. It does not cover symbolic links inside of symbolic links. For performance reasons, only the last resolved symbolic link is preserved and not the entire path resolution tree.

Related

@netlify
Copy link

netlify bot commented Jan 21, 2023

Deploy Preview for docs-rometools canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 612c695
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/6404dd4964445f0008ac2115

@realtimetodie
Copy link
Contributor Author

I expanded the test case.

crates/rome_fs/src/fs/os.rs Outdated Show resolved Hide resolved
crates/rome_fs/src/fs/os.rs Show resolved Hide resolved
crates/rome_fs/src/fs/os.rs Outdated Show resolved Hide resolved
@realtimetodie realtimetodie mentioned this pull request Feb 21, 2023
1 task
@realtimetodie realtimetodie mentioned this pull request Mar 5, 2023
@realtimetodie
Copy link
Contributor Author

@ematipico I documented the code and updated the test, now that #4158 was merged. Please let me know if this is sufficient.

Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just a comment around the diagnostics

@ematipico ematipico merged commit 04031db into rome:main Mar 5, 2023
ematipico pushed a commit that referenced this pull request Mar 10, 2023
…4166)

* fix(rome_fs): Allow to ignore patterns to symbolic links (symlinks)

* refactor: file_name might be None

* document the origin_path argument

* update test

* fix formatting

* update test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants