+
Skip to content

Conversation

arokettu
Copy link

This PR:

  • Adds new feature ...
  • Covered by tests
  • Doc PR: doesn't need to be documented

A small contribution should you choose to accept it.

Current scope: quoteless keys. Possible future scope: default comments like.

        /*
         * Explicitly add the default profile to the list of mutators, as even if it is
         * empty by default, it is not. If it would actually contain the default profile
         * by default, it would make the profiles feature more obvious to configure.
         */
        $configObject->mutators = [
            // this commentAfter will appear in JSON5
            '@default' => new CommentDecorator(true, commentAfter: 'Explicitly add the default profile'),
        ];

the generated config would look like:

{
    $schema: "https://raw.githubusercontent.com/infection/infection/master/resources/schema.json",
    source: {
        directories: [
            "src",
        ],
    },
    logs: {
        text: "reports/infection.log",
    },
    mutators: {
        '@default': true, // Explicitly add the default profile
    },
}

P.S. I can't find if your config generation is tested currently

Copy link
Contributor

composer.lock

Package changes

Package Operation From To About
arokettu/json5-builder add - 1.0.0 view code - License: MIT License

Settings · Docs · Powered by Private Packagist

@arokettu
Copy link
Author

I can't find if your config generation is tested currently

I see now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载