{"id":36419269,"url":"https://github.com/uhafner/pitmute","last_synced_at":"2026-02-24T23:01:25.269Z","repository":{"id":325624474,"uuid":"1101444749","full_name":"uhafner/pitmute","owner":"uhafner","description":"PIT plugin that provides several mutation filters to suppress PIT mutations","archived":false,"fork":false,"pushed_at":"2026-02-22T22:35:44.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-23T02:00:19.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uhafner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-21T17:23:05.000Z","updated_at":"2026-02-22T22:35:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/uhafner/pitmute","commit_stats":null,"previous_names":["uhafner/pit-suppressions-plugin","uhafner/pitmute"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/uhafner/pitmute","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhafner%2Fpitmute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhafner%2Fpitmute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhafner%2Fpitmute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhafner%2Fpitmute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uhafner","download_url":"https://codeload.github.com/uhafner/pitmute/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhafner%2Fpitmute/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29804134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T22:43:48.403Z","status":"ssl_error","status_checked_at":"2026-02-24T22:43:18.536Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-11T17:02:37.813Z","updated_at":"2026-02-24T23:01:25.263Z","avatar_url":"https://github.com/uhafner.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PitMute\n\n[![CI on all platforms](https://github.com/uhafner/pitmute/workflows/GitHub%20CI/badge.svg)](https://github.com/uhafner/pitmute/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/uhafner/pitmute/workflows/CodeQL/badge.svg)](https://github.com/uhafner/pitmute/actions/workflows/codeql.yml)\n[![Line Coverage](https://raw.githubusercontent.com/uhafner/pitmute/main/badges/line-coverage.svg)](https://github.com/uhafner/pitmute/actions/workflows/quality-monitor-comment.yml)\n[![Branch Coverage](https://raw.githubusercontent.com/uhafner/pitmute/main/badges/branch-coverage.svg)](https://github.com/uhafner/pitmute/actions/workflows/quality-monitor-comment.yml)\n[![Mutation Coverage](https://raw.githubusercontent.com/uhafner/pitmute/main/badges/mutation-coverage.svg)](https://github.com/uhafner/pitmute/actions/workflows/quality-monitor-comment.yml)\n\nThis PIT plugin provides several mutation filters to suppress PIT mutations. \n\nAll source code is licensed under the MIT license. Contributions to this library are welcome! \n\n### Requirements\n- Java 21+\n- Maven\n- Tests\n- PIT Mutation Testing\n\n### Installation\n\n1. Add the plugin as a dependency inside the PIT plugin section in your `pom.xml`\n    ```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003eedu.hm.hafner\u003c/groupId\u003e\n      \u003cartifactId\u003epitmute\u003c/artifactId\u003e\n      \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n    ```\n\n2. Activate the features\n\n    Enable one or both features as needed.\u003cbr\u003e\u003cbr\u003e\n\n    2.1 Filter Mutations by Annotation\n\n    To enable this feature, add the following to your configuration:\n    ```xml\n    \u003cconfiguration\u003e\n      \u003cfeatures\u003e+FANNOT\u003c/features\u003e\n    \u003c/configuration\u003e\n    ```\n\n    The `@SuppressMutation` annotation can be applied to methods or classes to suppress mutations within that scope. This feature also supports repeated annotations. \n    If no parameters are provided, `@SuppressMutation` suppresses all mutations in the scope. If multiple parameters are provided, **all conditions must be met** for a mutation to be ignored.\u003cbr\u003e\u003cbr\u003e\n\n    All annotation parameters are optional. If both `mutator` (enum) and `mutatorName` (string with mutator class name or fqcn) are provided, `mutatorName` is ignored.\u003cbr\u003e\u003cbr\u003e\n\n    2.2 Filter Mutations by CSV File\n\n    To use the CSV filter, activate the feature and specify the path to your CSV file.\n    ```xml\n    \u003cconfiguration\u003e\n      \u003cfeatures\u003e+FCSV(csvFile[src/main/resources/exclusions.csv])\u003c/features\u003e\n    \u003c/configuration\u003e\n    ```\n\n    Optionally, add `allowMissingFile[true]` to suppress errors when the CSV file is not found and receive an info log instead.\n    ```xml\n    \u003cconfiguration\u003e\n      \u003cfeatures\u003e+FCSV(csvFile[src/main/resources/exclusions.csv] allowMissingFile[true])\u003c/features\u003e\n    \u003c/configuration\u003e\n    ```\n    Create a CSV file with the following format:\n    \n    ```\n    className, Mutator, startLine, endLine\n    ```\n    \n    Only `className` is required. All other fields may be left empty.\n    \n    If multiple fields are provided, **all conditions must be true** for a mutation to be ignored.\n\n\n3. Install the plugin\n    ```\n    mvn install\n    ```\n\n### Annotation Details\n| Element                | Description                                                                                                                                                                                                                   | Examples                                                                                                                                                                                       |\n|:-----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| mutator (optional)     | Suppresses mutations created by mutator matching this enum (recommended). \u003cbr\u003eIf both mutator and mutatorName are provided, mutatorName is ignored.                                                                           | @SuppressMutation(mutator = MATH)                                                                                                                                                               |\n| mutatorName (optional) | Suppresses mutations created by mutator with this name. If mutator is set, this value is ignored.\u003cbr/\u003e- Mutator class name shortened (without \"Mutator\")\u003cbr/\u003e- Mutator class name\u003cbr/\u003e- Fully qualified name of mutator class | \u003cbr/\u003e@SuppressMutation(mutatorName = \"Math\")\u003cbr/\u003e@SuppressMutation(mutatorName = \"MathMutator\")\u003cbr/\u003e@SuppressMutation(mutatorName = \"org.pitest.mutationtest.engine.gregor.mutators.MathMutator\") |\n| line (optional)        | Restricts suppression to a specific line number, if it is in scope.                                                                                                                                                           | @SuppressMutation(line = 5)                                                                                                                                                                     |\n\n\n### Example Annotations\n\n| Examples                                        | Description                                                                                           |\n|:------------------------------------------------|:------------------------------------------------------------------------------------------------------|\n| @SuppressMutation                               | ignore all mutations in the scope (class or method)                                                   |\n| @SuppressMutation(mutator = MATH)               | ignore all MathMutator mutations in the scope                                                         |\n| @SuppressMutation(mutator = MATH, line = 5)     | ignore all MathMutator mutations on line 5 (only if the line is within the annotated method or class) |\n| @SuppressMutation(mutatorName = \"Math\")         | ignore all MathMutator mutations in the scope (fallback if enum is missing)                           |\n\n### CSV Field Explanation\n| Field                | Description                                                                                                                                                                                                                     | Examples                                                                                 |\n|:---------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|\n| className (required) | Defines the class where mutations should be ignored.\u003cbr/\u003e- Fully qualified name (recommended)\u003cbr\u003e- File name\u003cbr/\u003e- Class name \u003cbr/\u003e ```Caution! If multiple classes share the same name, the filter applies to all of them!```  | \u003cbr\u003ecom.example.Main\u003cbr\u003eMain.java\u003cbr\u003eMain                                                |\n| mutator (optional)   | Mutations created by this mutator are suppressed.\u003cbr/\u003e- Fully qualified name\u003cbr/\u003e-Class name\u003cbr/\u003e-Mutator name shortened (without \"Mutator\")                                                                                    | \u003cbr/\u003eorg.pitest.mutationtest.engine.gregor.mutators.MathMutator\u003cbr/\u003eMathMutator\u003cbr/\u003eMath |\n| startLine (optional) | Mutations at or after this line number are suppressed.                                                                                                                                                                          | number \u003e= 1                                                                              |\n| endLine (optional)   | Mutations at or before this line number are suppressed.                                                                                                                                                                         | number \u003c= line numbers in file                                                           |\n\n### Example CSV\n\n| Examples                           | Description                                                                         |\n|:-----------------------------------|:------------------------------------------------------------------------------------|\n| com.example.Main,,,                | ignore all mutations in Main                                                        |\n| com.example.Main, MathMutator,,    | ignore all MathMutator mutations in Main                                            |\n| com.example.Main, MathMutator,5,   | ignore all MathMutator mutations in Main from line 5 onward                         |\n| com.example.Main, MathMutator,5,10 | ignore all MathMutator mutations in Main between line 5 and 10 (including 5 and 10) |\n\n\n### Minimal Example pom.xml\n\n- PIT plugin\n- Annotation filter feature\n- CSV filter feature with path to CSV file (optionally, add `allowMissingFile[true]` to suppress errors when the CSV file is not found)\n- Plugin dependency\n\n```xml\n\u003cproperties\u003e\n  \u003cmaven.compiler.source\u003e21\u003c/maven.compiler.source\u003e\n  \u003cmaven.compiler.target\u003e21\u003c/maven.compiler.target\u003e\n  \u003cproject.build.sourceEncoding\u003eUTF-8\u003c/project.build.sourceEncoding\u003e\n\u003c/properties\u003e\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    \u003cplugin\u003e\n      \u003cgroupId\u003eorg.pitest\u003c/groupId\u003e\n      \u003cartifactId\u003epitest-maven\u003c/artifactId\u003e\n      \u003cversion\u003e1.20.2\u003c/version\u003e\n      \u003cconfiguration\u003e\n        \u003cfeatures\u003e+FANNOT\u003c/features\u003e\n        \u003cfeatures\u003e+FCSV(csvFile[src/main/resources/exclusions.csv])\u003c/features\u003e\n      \u003c/configuration\u003e\n      \u003cdependencies\u003e\n        \u003cdependency\u003e\n          \u003cgroupId\u003eedu.hm.hafner\u003c/groupId\u003e\n          \u003cartifactId\u003epitmute\u003c/artifactId\u003e\n          \u003cversion\u003e1.0.0\u003c/version\u003e\n        \u003c/dependency\u003e\n      \u003c/dependencies\u003e\n    \u003c/plugin\u003e\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuhafner%2Fpitmute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuhafner%2Fpitmute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuhafner%2Fpitmute/lists"}