Add documentation for extends configuration option#84
Conversation
✅ Deploy Preview for violinist-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for violinist-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR adds a new documentation page describing Violinist’s extends configuration option, focusing on inheriting shared configuration and layering multiple sources.
Changes:
- Adds a new
docs/configuration/extends.mdxpage documenting theextendsoption. - Provides examples for extending from a repo-local JSON file and from a Composer package.
- Describes precedence/override behavior when chaining multiple sources.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Each entry in the array can either reference a Composer package that exposes a Violinist configuration file or point to a relative path inside the repository. Violinist will fetch the configuration snippets in the order you list them, merge the keys they contain, and finally apply whatever options are defined directly inside the local `extra.violinist` block. Later entries, including the local configuration, always override values defined earlier in the list, allowing every project to keep its unique tweaks while inheriting the defaults that come from your shared templates. | ||
|
|
There was a problem hiding this comment.
The description of what a Composer package provides is internally inconsistent: here it says the package exposes a “Violinist configuration file”, but later the doc says Violinist reads the dependency’s extra.violinist block from its composer.json. Please align the wording and (if applicable) document the expected file name/path vs composer.json semantics explicitly so users know what to publish.
| } | ||
| ``` | ||
|
|
||
| In this example the project inherits the `automerge` value from the shared document, overrides the merge method to "merge", and adds an extra label next to the defaults that were defined globally. |
There was a problem hiding this comment.
This sentence says the local config “adds an extra label next to the defaults”, but earlier the doc states later entries “always override values defined earlier”. Please clarify how merging works for array values like labels (replace vs append/union), and adjust the example/explanation to match the actual behavior.
|
|
||
| ## Explanation | ||
|
|
||
| When you have many repositories that should behave the same way, copying the full Violinist configuration to every `composer.json` quickly becomes hard to maintain. The `extends` option lets you centralise your shared settings in one or more remote JSON documents and ask Violinist to import them before applying the project specific overrides that live in the repository. |
There was a problem hiding this comment.
Hyphenation: “project specific” should be “project-specific” when used as a compound modifier.
| When you have many repositories that should behave the same way, copying the full Violinist configuration to every `composer.json` quickly becomes hard to maintain. The `extends` option lets you centralise your shared settings in one or more remote JSON documents and ask Violinist to import them before applying the project specific overrides that live in the repository. | |
| When you have many repositories that should behave the same way, copying the full Violinist configuration to every `composer.json` quickly becomes hard to maintain. The `extends` option lets you centralise your shared settings in one or more remote JSON documents and ask Violinist to import them before applying the project-specific overrides that live in the repository. |
|
|
||
| Each entry in the array can either reference a Composer package that exposes a Violinist configuration file or point to a relative path inside the repository. Violinist will fetch the configuration snippets in the order you list them, merge the keys they contain, and finally apply whatever options are defined directly inside the local `extra.violinist` block. Later entries, including the local configuration, always override values defined earlier in the list, allowing every project to keep its unique tweaks while inheriting the defaults that come from your shared templates. | ||
|
|
||
| Because extended configuration is resolved at run time, you can update a central document and have every repository inherit the change the next time Violinist runs. When you share configuration through a Composer package, each project still needs to receive an updated version of that package—usually by running an automated dependency update such as a Violinist pull request—before the new settings take effect. This keeps large organisations aligned without requiring the same change to be repeated in dozens of composer files. |
There was a problem hiding this comment.
Wording: “run time” is typically written as “runtime” in this context.
| Because extended configuration is resolved at run time, you can update a central document and have every repository inherit the change the next time Violinist runs. When you share configuration through a Composer package, each project still needs to receive an updated version of that package—usually by running an automated dependency update such as a Violinist pull request—before the new settings take effect. This keeps large organisations aligned without requiring the same change to be repeated in dozens of composer files. | |
| Because extended configuration is resolved at runtime, you can update a central document and have every repository inherit the change the next time Violinist runs. When you share configuration through a Composer package, each project still needs to receive an updated version of that package—usually by running an automated dependency update such as a Violinist pull request—before the new settings take effect. This keeps large organisations aligned without requiring the same change to be repeated in dozens of composer files. |
Summary
extendsoption for ViolinistTesting
https://chatgpt.com/codex/tasks/task_b_68d77e52b108832a885091fc001ff224