NAME
Dist::Conformance::Config - .conformance.yml, which picks the flavor of a repository and its source
VERSION
version 0.002
SYNOPSIS
use 5.040;
use Dist::Conformance::Config;
use Dist::Conformance::Snapshot::Directory;
my $config = Dist::Conformance::Config::load( Dist::Conformance::Snapshot::Directory->new( root => '/bogus/checkout' ) );
say $config->{flavor};
DESCRIPTION
A repository says which standards it is held to in .conformance.yml at its root: which flavor, from which source, which checks it skips, and what it sets differently from the flavor.
# .conformance.yml
flavor: troglodyne-5.040
source:
git: https://forge.test.test/standards.git
ref: main
path: skills/packaging-perl
skip:
- Workflows
checks:
ClaudeSettings:
missing: fail
GitHooks:
replace: true
variables:
DIST: Foo-Bar
AUTHOR_NAME: A. Tester
AUTHOR_EMAIL: tester@test.test
FUNCTIONS
load
($snapshot). The validated .conformance.yml of the snapshot, with the defaults filled in. Dies when the file is missing, does not parse or is not valid.
validate
($data). $data checked against %SCHEMA, with the defaults filled in, for a caller that has the configuration without the file.
KEYS
- flavor
-
Required. The name of the flavor, which is the file conformance/NAME.yml of the source.
- source
-
Required. Where the standards are, as one of:
{ git => URL, ref => REF, path => PATH }-
A git repository.
refis a branch, a tag or a commit, defaultHEAD, the default branch. See Dist::Conformance::Source::Git. { directory => DIR, path => PATH }-
A directory on this machine. A relative
DIRis relative to the root of the repository. See Dist::Conformance::Source::Directory.
In both,
pathis the directory inside the tree that holds conformance/, default the top. - skip
-
The names of the checks of the flavor not to run. A skipped check is reported as
skip, and an update does not touch what it would have changed. Naming a check that the flavor does not run is an error, so that a misspelling does not quietly skip nothing. - checks
-
A mapping from the name of a check of the flavor to the settings that this repository has differently, laid over the configuration of the flavor by "THE MERGE RULE" in Dist::Conformance::Flavor: each key replaces the same key of the flavor, and a key set to
~is removed. It cannot add a check that the flavor does not run; write a flavor that extends it for that. - variables
-
Values for the placeholders of the templates, such as
DIST, laid over the variables of the flavor.
Every key is validated, and an error names the file and the key, such as .conformance.yml is not valid: /skip/0: ....
SEE ALSO
Please see those modules/websites for more information related to this module.
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/Troglodyne-Internet-Widgets/Dist-Conformance/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHORS
Current Maintainers:
George S. Baugh <george@troglodyne.net>
COPYRIGHT AND LICENSE
Copyright (c) 2026 Troglodyne LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.