JetBrains / JetBrains/resharper-unity
Show notification if file lives in folder ending with tilde
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
Unity ignores files and folders with names that end with `~`. This is due to e.g. Vim saving backups of files with the original name plus tilde. Any name with this pattern is ignored and crucially, not imported into the asset database.
Unity's package manager takes advantage of this to include folders in a package that should not be included into a Unity project, such as `Documentation~`. Rider will show this in the Unity Explorer with a "greyed" out folder to indicate that it's not imported into the asset database.
Unity will also use this folder structure to distribute samples, e.g. `Examples~`. The IntelliJ platform includes `*~` as an ignore mask in _Preferences | Editor | File Types_, so any file under a folder such as `Examples~` will be completely ignored. The backend will still perform analysis, but the frontend acts as though the file doesn't exist and doesn't show any analysis. There are also occasional exceptions (see [RIDER-48339](https://youtrack.jetbrains.com/issue/RIDER-48339).
Since this is a common pattern for Unity projects, Rider should provide a notification (either sticky balloon or editor banner) to explain what's going on and how to fix it. E.g.
> This file is part of a C# project, but ignored by VCS settings
Or some such, with a "read more" link to a web page to explain what the problem is and how to workaround (e.g. copy project or edit ignore file settings).
It's not possible to automatically edit the settings as there is no API, and the default list is hardcoded, so a "read more" link is probably the best option.
Contributor guide
Research direction
Start by reviewing the IntelliJ platform's `*~` ignore-mask behavior and Rider's Unity Explorer handling of folders such as `Documentation~` and `Examples~`. The change should notify users when an open file is hidden by this pattern and explain the available workaround through a read-more link.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- developer-experience, game-dev, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100