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

[dslx_fmt] Support multiple arguments as input, similar to other formatters #1884

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cdleary
Copy link
Collaborator

@cdleary cdleary commented Jan 24, 2025

This lets us slot into a pre-commit hook more easily, looks like it batches up about 8 files at a time by default to avoid too many subprocess invocations.

@cdleary cdleary marked this pull request as ready for review January 24, 2025 18:29
@meheff meheff requested a review from dplassgit January 24, 2025 18:56
bool has_stdin_arg =
std::any_of(input_paths.begin(), input_paths.end(),
[](std::string_view path) { return path == "-"; });
if (has_stdin_arg) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thoughts on adding tests for each of these cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I've got testing in the .py for the interesting modes and combinations now -- LMK if you see any more that seem like they're missing!

@cdleary cdleary force-pushed the cdleary/2025-01-24-dslx-fmt-multi-arg branch 2 times, most recently from 5a04009 to 1f0a127 Compare January 24, 2025 22:18
@cdleary cdleary force-pushed the cdleary/2025-01-24-dslx-fmt-multi-arg branch from 1f0a127 to f44822f Compare January 24, 2025 22:20
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