Merged
Conversation
lionel-
approved these changes
Mar 12, 2026
Collaborator
lionel-
left a comment
There was a problem hiding this comment.
Probably worth calling out the gitignore behaviour in the clap doc. I mostly use the LSP, but if I was a CLI user it'd affect me because I have gitignored folders containing scratch R files in my R projects.
1b6e414 to
3978563
Compare
6d2bb77 to
e28ab41
Compare
3978563 to
5ce43e4
Compare
53f3c03 to
eeeaf5f
Compare
eeeaf5f to
91d6388
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branched from #476, this is a follow up to that PR to add back a way to
--forceformatting on command line provided files and folders, regardless of exclusion patterns and inclusion patternsWith this PR, the "unsafe" thing becomes opt in, which feels right.
Note that
--forceonly applies toexclude,default-exclude, and our internaldefault-includepatterns. It does not apply to our.gitignoresupport because that's already a little complicated. We unconditionally respect your.gitignore, but due to the way theignoreRust crate works, if you doair format git-ignored.Rthen it will format that regardless because theignorecrate author thinks that a user supplied file should always count, regardless of the.gitignore. I think that is much less of an issue compared to #476, because pre-commit knows to never call hooks on gitignored files, and it seems very unlikely that RStudio would ever do this. I'm not super worried about this, especially since we don't expose any way to turn off gitignore support anyways.