Skip to content

Latest commit

 

History

History
248 lines (190 loc) · 8.98 KB

profiles.md

File metadata and controls

248 lines (190 loc) · 8.98 KB
title type order
Profiles
guide
6

Infection supports the use of mutator profiles for the command line and configuration file.

The following configuration file will use the @default profile, but turn off the @function_signature profile. On top of that, it does not apply the TrueValue mutator on any classes that match the provided ignore patterns. In particular, TrueValue mutator does not mutate the code inside Full\NameSpaced\Class class and inside create() method of all SourceClass classes.

These ignores can also be added to profiles, to ensure infection is as flexible as you need it.

All profiles are prepended by an @ and in snake case, while all mutators are in PascalCase.

{
    "source": {
        "directories": [
            "src"
        ]
    },
    "timeout": 10,
    "logs": {
        "text": "infection.log"
    },
    "mutators": {
        "@default": true,
        "@function_signature": false,
        "TrueValue": {
            "ignore": [
                "NameSpace\\*\\SourceClass::method",
                "Full\\NameSpaced\\Class"
            ]
        }
    }
}

The Profiles

Currently, infection supports the following profiles:

@arithmetic

Contains the following mutators:

@boolean

Contains the following mutators:

@cast

Contains the following mutators:

@conditional_boundary

Contains the following mutators:

@conditional_negotiation

Contains the following mutators:

@equal

Contains the following mutators:

@function_signature

Contains the following mutators:

@identical

Contains the following mutators:

@number

Contains the following mutators:

@operator

Contains the following mutators:

@regex

Contains the following mutators:

@removal

Contains the following mutators:

@return_value

Contains the following mutators:

@sort

Contains the following mutators:

@unwrap

Contains the following mutators:

@zero_iteration

Contains the following mutators:

@default

This is the default profile, which currently contains most mutators, and is used if no mutator or profile is chosen.

Feel free to request a new profile to be added in Github's issues.