Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): clarify multiple uses of linguist-generated #478

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,18 @@ Assuming you installed with the typical layout:

### Ignoring files explicitly

Commonly, the underlying formatters that rules_lint invokes provide their own methods of excluding files (.prettierignore for example). At times when that is not the case, rules_lint provides its
own escape hatch to exclude files from linting using attributes specified via [`.gitattributes` files](https://git-scm.com/docs/gitattributes).
Commonly, the underlying formatters that rules_lint invokes provide their own methods of excluding files (.prettierignore for example).

At times when that is not the case, rules_lint provides a means to exclude files from being formatted by using attributes specified via [`.gitattributes` files](https://git-scm.com/docs/gitattributes).

If any of following attributes are set or have a value of `true` on a file it will be excluded:

- `rules-lint-ignored=true`
- `gitlab-generated=true`
- `linguist-generated=true`
- `rules-lint-ignored=true`

Note that the first two attributes also have the side effect of preventing the generated files from being shown to code reviewers,
and from being included in language stats, for GitLab and GitHub respectively. See [GitHub docs](https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github).

### Install as a pre-commit hook

Expand Down