✨ filename-lint ✨
Star ⭐️ or Donate 💰 if you like it!
English | 简体中文 | Github | Gitee
An extension for Visual Studio Code that enforces consistent naming conventions for your files and folders.
-
Add the following configuration to settings.json file.
"filename-lint.enabled": true
"filename-lint.enabled""filename-lint.namingPattern""filename-lint.includePatterns""filename-lint.excludePatterns"
filename-lint.check-manually
- See the changelog for details.
-
Windows-Specific Git Behavior:
-
After
git initorgit cloneon Windows, git automatically setscore.ignorecase = truein its configuration, making filenames case-insensitive. -
It will cause git to be unable to track changes in the case of file names (e.g.
File.txt=>file.txt), which may result in different file names between the remote and local repository. -
Note: Global settings won’t override it.
- Running
git config --global core.ignorecase falsehas no effect. - Need manually configure
git config core.ignorecase falseafter eachgit initorgit clone.
- Running
-
-
Proactive Solution:
-
It might be a good idea to enforce lowercase names for files and folders to avoid this issue.
-
It's also default behavior of
filename-lintwhen enabled."filename-lint.enabled": true
-
When enabled, a warning is given if a file or folder name appears in uppercase letters.
-
Customization: It can be customized by Extension Settings.
-