We sometimes create export tar files that include all the source files but do not include the .git directory. With ruff this leaves us in the situation where when a developer is using the git repo ruff ignores all the built files in the directory but when they are building from the export tar files it does not.
Is it possible for ruff --respect-gitignore to respect the .gitignore even if there is no .git directory? I realize that ruff scans parent directories looking for a git repo but if it can't find one can it check the current directory for a .gitignore anyhow? Renaming the .gitignore to .ignore does "fix" the problem but adding a .ignore to every repo (with a symlink say) is not a great solution for us. Is there a command line switch I'm missing for specifying that I want .gitignore to be the .ignore file?
The current behavior makes the two scenarios inconsistent for us and we don't really want to add explicit ignores into the ruff configuration file for everything that's already listed in .gitignore.
We sometimes create export tar files that include all the source files but do not include the
.gitdirectory. Withruffthis leaves us in the situation where when a developer is using the git reporuffignores all the built files in the directory but when they are building from the export tar files it does not.Is it possible for
ruff --respect-gitignoreto respect the.gitignoreeven if there is no.gitdirectory? I realize that ruff scans parent directories looking for a git repo but if it can't find one can it check the current directory for a.gitignoreanyhow? Renaming the.gitignoreto.ignoredoes "fix" the problem but adding a.ignoreto every repo (with a symlink say) is not a great solution for us. Is there a command line switch I'm missing for specifying that I want.gitignoreto be the.ignorefile?The current behavior makes the two scenarios inconsistent for us and we don't really want to add explicit ignores into the ruff configuration file for everything that's already listed in .gitignore.