https://github.com/wraith13/file-attributes-vscode
This is a VS Code Extension that refers to .gitattributes and .gitignore, and displays a message at the top of files that are either auto-generated or not under source control.
https://github.com/wraith13/file-attributes-vscode
Last synced: 10 months ago
JSON representation
This is a VS Code Extension that refers to .gitattributes and .gitignore, and displays a message at the top of files that are either auto-generated or not under source control.
- Host: GitHub
- URL: https://github.com/wraith13/file-attributes-vscode
- Owner: wraith13
- License: bsl-1.0
- Created: 2025-07-12T05:19:33.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-28T10:25:11.000Z (about 1 year ago)
- Last Synced: 2025-08-10T23:27:13.395Z (12 months ago)
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=wraith13.file-attributes
- Size: 1.6 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE_1_0.txt
Awesome Lists containing this project
README
# File Attributes VS Code Extension README
This is a VS Code Extension that refers to `.gitattributes` and `.gitignore`, and displays a message at the top of files that are either auto-generated or not under source control.
Support languages: English(en), Čeština(cs), Deutsch(de), Español(es), Français(fr), Magyar(hu), Italiano(it), 日本語(ja), 한국어(ko), Polski(pl), Português Brasileiro(pt-br), Русский(ru), Türkçe(tr), 简体中文(zh-cn), 繁體中文(zh-tw)
## Screenshots


## Tutorial
### 0. ⬇️ Install File Attributes
Show extension side bar within VS Code(Mac:Command+Shift+X, Windows and Linux: Ctrl+Shift+X), type `file-attributes-vscode` and press Enter and click Install. Restart VS Code when installation is completed.
### 1. ✨️ Automatic Warning Display
This extension has no settings or commands. When you open files that are specified as auto-generated in `.gitattributes` or ignored by `.gitignore`, a warning message is automatically displayed at the top of the file.
Enjoy!
## Indicating Auto-Generated Files in `.gitattributes`
To explicitly mark files as auto-generated in your repository, you can use the `.gitattributes` file. By specifying certain attributes, you inform tools and contributors that these files are generated automatically and should not be manually edited.
For example, you can add the following line to your `.gitattributes` file:
```gitattributes
# Mark all files in the 'generated/' directory as auto-generated
generated/* linguist-generated=true
```
Or, to mark specific file types as auto-generated:
```gitattributes
# Mark all .pb.go files as auto-generated
*.pb.go linguist-generated=true
```
The `linguist-generated=true` attribute is recognized by many tools (such as GitHub) to identify generated files. This extension also uses this attribute to display a message at the top of the file in VS Code, warning users that the file is auto-generated.
**Note:** You can adjust the file patterns as needed for your project structure.
No further configuration is required—just maintain your `.gitattributes` file as usual.
## Indicating Ignored Files in `.gitignore`
To have this extension display a warning for files ignored by source control, add file patterns to your `.gitignore` file as you normally would. For example:
```gitignore
# Ignore all log files
*.log
# Ignore build output directories
/dist/
/build/
```
When you open a file in VS Code that matches a pattern in `.gitignore`, the extension will automatically show a message at the top of the file indicating it is ignored by source control.
No additional configuration is required—just maintain your `.gitignore` as usual.
## Release Notes
see ChangLog on [marketplace](https://marketplace.visualstudio.com/items/wraith13.file-attributes-vscode/changelog) or [github](https://github.com/wraith13/file-attributes-vscode/blob/master/CHANGELOG.md)
## Support
[GitHub Issues](https://github.com/wraith13/file-attributes-vscode/issues)
## License
[Boost Software License](https://github.com/wraith13/file-attributes-vscode/blob/master/LICENSE_1_0.txt)
## Download VSIX file ( for VS Code compatible softwares )
[Releases · wraith13/file-attributes-vscode](https://github.com/wraith13/file-attributes-vscode/releases)
## Other extensions of wraith13's work
|Icon|Name|Description|
|---|---|---|
| |[Unsaved Files](https://marketplace.visualstudio.com/items?itemName=wraith13.unsaved-files-vscode)|Easy access to unsaved files for VS Code.|
| |[File Path Bar](https://marketplace.visualstudio.com/items?itemName=wraith13.file-path-bar)|Show active file path in status bar.|
| |[Open in GitHub Desktop](https://marketplace.visualstudio.com/items?itemName=wraith13.zoombar-vscode)|Open in GitHub Desktop from VS Code.|
See all wraith13's expansions: