Repository navigation
feat: add vale init command to scaffold configuration - #1201
AdamMagued wants to merge 1 commit into
Conversation
Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
|
Before this is reviewed, please read the AI-Assisted Contributions section of the contributing guide and make sure this change meets it: you can explain every line, the description is your own and brief, it fixes a bug you hit or a feature agreed in an issue, it does not touch undocumented options, and any substantial tool use is noted. |
|
The license agreement is signed. |
|
I have read the CLA and I agree to it |
|
Closing this in favor of the two setup paths Vale already has. A useful starting config depends on the repository: which formats it has, which package fits its style, which terms belong in the vocabulary. A fixed template can't know any of that, and this one fails on its first run until
Thanks for picking up #1156. |
Summary
Implements the
vale initcommand to scaffold an initial.vale.iniconfiguration and the associated styles directory as requested in #1156.Resolves #1156.
Changes
InitConfigininternal/core/config.gowithDefaultConfigTemplatespecifyingStylesPath = styles,MinAlertLevel = suggestion,Packages = Google, and[*.{md,txt}]withBasedOnStyles = Vale, Google.StylesPathdirectory alongside the generated configuration file..vale.ini,vale.ini, or_vale.ini).init [path]incmd/vale/command.goand command handlerinitCmdincmd/vale/main.go.internal/core/config_test.goand CLI command tests incmd/vale/init_test.gocovering path resolution, directory scaffolding, conflict handling, and pipeline parsing.Verification
go test ./internal/core -vandgo vet ./internal/corepassed cleanly in container sandbox.go test ./cmd/vale -v -run TestInitandgo vet ./cmd/valepassed cleanly in container sandbox.