Implement Init and fix setting build variables #26
No reviewers
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: numtide/treefmt#26
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/init"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -24,0 +30,4 @@
// For the same reasons above we implement init like this
for _, arg := range os.Args {
if arg == "--init" || arg == "-i" {
if err := os.WriteFile("treefmt.toml", initBytes, 0o644); err != nil {
you can use path.join(WorkingDirectory, ConfigFile) to make the file configurable
Never mind, I missed that it runs before the CLI parser.
@ -23,1 +29,4 @@
// For the same reasons above we implement init like this
for _, arg := range os.Args {
if arg == "--init" || arg == "-i" {
Move this in the other loop, so the Args aren't being looped twice
@ -24,0 +34,4 @@
fmt.Printf("Failed to write treefmt.toml: %v\n", err)
os.Exit(1)
}
It would be nice to say something like "Generated treefmt.toml. Now it's your turn to edit it."
2512b7f074
to49596b8e08