repository
Tracked files: large files outside Git LFS, merge-conflict markers, and paths that a configuration keeps out of Git.
Selected when
Section titled “Selected when”Always.
Checks
Section titled “Checks”large-files
Section titled “large-files”Checks that each tracked file over the size limit goes through Git LFS or has a reason.
Runs at the commit stage.
A large file in plain Git history stays in every clone forever.
What to do
Section titled “What to do”Track the file with Git LFS, classify it as generated or vendored in .gitattributes, or raise repository.max_file_kilobytes with a reason.
Example
Section titled “Example”A tracked notes/big.txt over repository.max_file_kilobytes reports size. Delete the file, or store it through Git LFS.
Turn it off
Section titled “Turn it off”gspot ignore repository/large-files --paths "<path>" --reason "<why>"local-files
Section titled “local-files”Reports a tracked file at a path that a configuration keeps out of Git, and each tracked symbolic link that leaves the repository.
Runs at the commit stage, once for the repository.
Machine-local values and installed packages belong outside shared Git history.
What to do
Section titled “What to do”Add the reported file or folder to .gitignore and remove it from the index with git rm --cached.
Example
Section titled “Example”A tracked .env reports tracked-file. Add the path to .gitignore, then run git rm --cached .env, which keeps the file on disk.
Lint rules
Section titled “Lint rules”| Rule | What it checks | What to do |
|---|---|---|
tracked-file |
Git tracks no file that a selected configuration declares local, such as .env. |
Run git rm --cached <path>, and list the path in .gitignore. |
absolute-link |
Each symbolic link has a relative target. | Use a relative link target inside the repository. |
outward-link |
Each symbolic link points inside the repository. | Replace the link with the file or folder it points to, or delete it. |
Turn it off
Section titled “Turn it off”gspot ignore repository/local-files --paths "<path>" --reason "<why>"gspot ignore repository/local-files --rule tracked-file --reason "<why>"conflict-markers
Section titled “conflict-markers”Reports each line of a tracked text file that a Git merge conflict leaves behind.
Runs at the commit stage.
A file with conflict markers holds both sides of a merge, and a fixer can turn the markers into content that passes.
What to do
Section titled “What to do”Keep the side of the conflict that you want, and delete the marker lines.
Example
Section titled “Example”A line <<<<<<< HEAD left in a file reports conflict-marker. Resolve the conflict, and delete the markers.
Turn it off
Section titled “Turn it off”gspot ignore repository/conflict-markers --paths "<path>" --reason "<why>"encoding
Section titled “encoding”Checks that tracked text files use UTF-8.
Runs at the commit stage.
A text check reads the wrong characters in a file that is not UTF-8.
What to do
Section titled “What to do”Save the reported file as UTF-8.
Example
Section titled “Example”A tracked Latin-1 notes.md reports encoding. Save the file as UTF-8.
Lint rules
Section titled “Lint rules”| Rule | What it checks | What to do |
|---|---|---|
encoding |
Each tracked text file is UTF-8. | Convert the file to UTF-8 in an editor or with iconv. |
path-encoding |
Each tracked path is UTF-8. | Give the file a name that is valid UTF-8, such as a name in plain ASCII. |
Turn it off
Section titled “Turn it off”gspot ignore repository/encoding --paths "<path>" --reason "<why>"gspot ignore repository/encoding --rule encoding --reason "<why>"Settings
Section titled “Settings”| Setting | What it sets |
|---|---|
repository.max_file_kilobytes |
The largest file, in kilobytes, that Git may track without Git LFS or a linguist-generated or linguist-vendored mark in .gitattributes. |
Paths that must stay out of Git
Section titled “Paths that must stay out of Git”**/coverage/**. repository/local-files reports a tracked file at these paths.