Skip to content

allow checking formatting with cache#1830

Open
sd-st wants to merge 1 commit intobelav:mainfrom
sd-st:faster-check
Open

allow checking formatting with cache#1830
sd-st wants to merge 1 commit intobelav:mainfrom
sd-st:faster-check

Conversation

@sd-st
Copy link

@sd-st sd-st commented Mar 10, 2026

Description

I run csharpier check as part of my lint flow, which means I run it a lot. On one of my repositories it takes 200ms to run format and 8000ms to run check. This PR allows for check to use the cache (although it can be disabled, just like for format)

Related Issue

Checklist

  • My code follows the project's code style
    • always var
    • follow existing naming conventions
    • always this.
    • no pointless comments
  • I will not force push after a code review of my PR has started
  • I have added tests that cover my changes

@sd-st
Copy link
Author

sd-st commented Mar 10, 2026

I think there's probably nothing to test here; it doesn't look like there were tests for the previous behaviour (and no tests for the CLI arguments in general as far as I can tell)

belav added a commit that referenced this pull request Mar 14, 2026
Copy link
Owner

@belav belav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My worry with this change is that I had a commit to specifically disable the cache when running check, but I don't recall why I would have made that change and neglected to leave a comment explaining why.

81c36d7

It seems safer to have a new option for the check command --use-cache so that it can default to the current behavior.

@sd-st sd-st requested a review from belav March 16, 2026 13:47
@sd-st
Copy link
Author

sd-st commented Mar 16, 2026

I do think it's a little unfortunate to have a different API surface between checking and formatting but I made that change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants