-
Notifications
You must be signed in to change notification settings - Fork 3
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
Run on an entire project in a single command #5
Comments
As a human, I imagine myself using this feature in a new cloned project. Do we really want the TOML file to control what files to be formated and what not? or is this to be used in CI/CD? What are the other use cases for this feature and how important is it? |
I see the following general use cases.
Where the TOML file comes into play is the "qualified" files part. If I were working on a project with Apex doesn't really do dependencies the same but I might want to exclude imported library files (maybe I'm working with FFLLIB or similar) and I never want There are probably a few other cases, or more sub-cases to each of these. Importance: I think being able to mass-reformat a codebase would be important for some. I've seen entire repos with one big commit for a new baseline formatting because they didn't want to see the changes included in future PRs as noise. For me, evaluating I don't think the TOML settings are as important to me, not to say I don't want it, but Apex has fewer "don't touch me" files than many other project types, I think the absence of configuration for project-wide scope is less of a problem but still maybe a 1.0 feature? |
I went and took the script from your battle tests so I could process an entire project. That helped me to do a better review on the formatted output.
I suspect it would be faster by a large margin if it were contained in single binary execution instead of starting and stopping each time. |
ahha, good job! Tools such as GNU parallel can easily multi-threading, or I could have a built-in feature in terms of formatting multiple files. |
Thanks for sharing your thoughts & experience! I probably have to focus on covering up the percentages in Project progress to get a well-rounded formatting tool before looking into the other accessory features. It'd be nice to have a 2nd person to handle these in parallel, but I dont 😃 . |
I hope I don't sound demanding. I'm very excited and grateful for your efforts here. There is no timeline on these, just filling the backlog if you will. I'm hoping that after I take a first review pass I can find some time to learn Rust and be able to contribute. I'll let you know if I can get there and ask for some easy first issues :) |
no, not at all. This is all important in this project and I appreciate you already consider and put thoughts on them. You have many great IT skills under the belt already, do things you enjoy if learning Rust is it 👍 |
It would be great if I could have a single execution that could process many files at once. Probably aiming at a directory path and discovering all compatible files (based on file suffix; probably
apex
,apexc
,trigger
,cls
) and it would attempt to format each of them in turn, including per-file processing time and optionally writing back to the file.I would expect the configuration TOML file to allow configurations for this process, such as a series of GLOB patterns for files that should be ignored maybe changing the file suffixes that are included. Maybe two glob arrays, one for include and another for exclude. Exclude winning if a file matches both.
The text was updated successfully, but these errors were encountered: