Add `--force-exclude` option to CLI
ty checks every path specified on the CLI even if they match an exclude pattern. This is because explicitly passed paths are considered explicit than an exclusion pattern.
This behavior generally matches expectation but it's problematic when integrating ty with other tools that aren't aware of the exclusions. For example, pre-commit (also see https://github.com/astral-sh/ty/issues/269), passes all changed files to ty, including paths excluded in ty.
We should add an option similar to Ruff's --force-exclude that gives exclude patterns higher precedence over the paths passed on the CLI, enforcing that the exclusion rules are respected even for files passed on the CLI
Bazel is another example of a tool that typically passes files as individual paths, and therefore would benefit from this feature.
Thank you for all the incredible work!
Good to know. This should be very easy to implement.