{"id":23478225,"url":"https://github.com/checkstyle/patch-filters","last_synced_at":"2025-10-04T18:34:55.760Z","repository":{"id":63141946,"uuid":"268880475","full_name":"checkstyle/patch-filters","owner":"checkstyle","description":"Suppression Filter for Checkstyle that is based on patch file ","archived":false,"fork":false,"pushed_at":"2024-09-03T16:01:34.000Z","size":745,"stargazers_count":4,"open_issues_count":9,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T21:32:20.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/checkstyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-06-02T18:39:12.000Z","updated_at":"2025-02-08T06:53:40.000Z","dependencies_parsed_at":"2025-09-07T21:37:43.971Z","dependency_job_id":null,"html_url":"https://github.com/checkstyle/patch-filters","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/checkstyle/patch-filters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkstyle%2Fpatch-filters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkstyle%2Fpatch-filters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkstyle%2Fpatch-filters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkstyle%2Fpatch-filters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/checkstyle","download_url":"https://codeload.github.com/checkstyle/patch-filters/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkstyle%2Fpatch-filters/sbom","scorecard":{"id":275369,"data":{"date":"2025-08-11","repo":{"name":"github.com/checkstyle/patch-filters","commit":"3326be25197f0ef1b97ba63c6e61583dcac29fbf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":7,"reason":"Found 17/24 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/checkstyle/patch-filters/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/checkstyle/patch-filters/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/checkstyle/patch-filters/maven.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v2.1: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-wxr5-93ph-8wr9","Warn: Project is vulnerable to: GHSA-3p86-9955-h393","Warn: Project is vulnerable to: GHSA-vrpq-qp53-qv56"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T14:15:48.181Z","repository_id":63141946,"created_at":"2025-08-17T14:15:48.181Z","updated_at":"2025-08-17T14:15:48.181Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274101211,"owners_count":25222444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-12-24T19:17:16.667Z","updated_at":"2025-10-04T18:34:50.684Z","avatar_url":"https://github.com/checkstyle.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# patch-filters\nspecial project to host Patch Suppressions\n\n[![][mavenbadge img]][mavenbadge]\nor at [repo](https://repo1.maven.org/maven2/com/puppycrawl/tools/patch-filters/).\n\n\n## PatchFilter Description\n\n### SuppressionPatchFilter\n\nFilter SuppressionPatchFilter(Checker level) only accepts audit events for Check violations whose line number\nbelong to added/changed lines in patch file and will suppress all Checks’ violation messages\nwhich are not from added/changed lines. If there is no configured patch file\nor the optional is set to true and patch file was not found the Filter suppresses all audit events.\n\n#### Properties\n\n | name                  | description                                                  | type                                                         | default value |\n | --------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------- |\n | file                  | Specify the location of the patch file.                      | [String](https://checkstyle.sourceforge.io/property_types.html#String) | null          |\n | optional              | Control what to do when the file is not existing. If `optional` is set to `false` the file must exist, or else it ends with error. On the other hand if optional is `true` and file is not found, the filter suppresses all audit events. | [boolean](https://checkstyle.sourceforge.io/property_types.html#boolean) | false         |\n | strategy              | Control suppression scope that you need. If `startegy` is set to `newline`, it only accepts audit events for Check violations whose line number belong to added lines in patch file. `patchedline` will accept added/changed lines. | [String](https://checkstyle.sourceforge.io/property_types.html#String) | newline       |\n | neverSuppressedChecks | String has user defined Checks to never suppress if files are touched, split by comma. This property is useful for Checks that place violation on whole file or on not all (first/last) occurrence of cause/violated code. | [String](https://checkstyle.sourceforge.io/property_types.html#String) | null          |\n\n#### Examples\n\nFor example, the following configuration fragment directs the Checker to use a SuppressionPatchFilter with patch file config/file.patch:\n```xml\n\u003cmodule name=\"com.puppycrawl.tools.checkstyle.filters.SuppressionPatchFilter\"\u003e\n    \u003cproperty name=\"file\" value=\"config/file.patch\" /\u003e\n    \u003cproperty name=\"strategy\" value=\"newline\" /\u003e\n\u003c/module\u003e\n```\n\nthe following configuration fragment direts the Checker to use a SuppressionPatchFilter\nwith patch file config/file.patch, whose strategy is `patchedline`,and never suppress\nchecks `Translation` and `UniqueProperties`:\n```xml\n\u003cmodule name=\"com.puppycrawl.tools.checkstyle.filters.SuppressionPatchFilter\"\u003e\n    \u003cproperty name=\"file\" value=\"config/file.patch\" /\u003e\n    \u003cproperty name=\"strategy\" value=\"patchedline\" /\u003e\n    \u003cproperty name=\"neverSuppressedChecks\" value=\"Translation,UniqueProperties\" /\u003e\n\u003c/module\u003e\n```\n\n### SuppressionJavaPatchFilter\n\nFilter SuppressionJavaPatchFilter(TreeWalker level) has three different strategies that control suppression\nscope. if property `strategy` is set to `newline`, then it only accepts TreeWalker audit events for TreeWalker\nCheck violations whose line number belong to added lines in patch file and will suppress all TreeWalker Checks’\nviolation messages which are not from added lines. if property `strategy` is set to `patchedline`, it will accept\nall violations whose line number belong to added/changed lines in patch file. if property `strategy` is set to `context`,\nfor checks listed in `supportContextStrategyChecks`, it will not only accept violations whose line number belong to added/changed/deleted lines,\nbut also consider a wider context that new code introduces violations outside of added/changed lines, but its child nodes in added/changed lines,\nfor checks not listed in `supportContextStrategyChecks`, it will accept violations whose line number belong to added/changed/deleted lines in patch file.\nIf there is no configured patch file or the optional is set to true and patch file was not found the Filter suppresses all audit events.\n\nNote that it's ok to use all four properties (`supportContextStrategyChecks`, `checkNameForContextStrategyByTokenOrParentSet`, `checkNameForContextStrategyByTokenOrAncestorSet`,\n`neverSuppressedChecks`), and the context scope of the three is also growing, for TreeWalker checks only in one of the property, its context scope is the same as that property,\nif in two or all properties, then the The context scope is the maximum scope. \n\nAttention: `supportContextStrategyChecks` and `checkNameForContextStrategyByTokenOrParentSet`, `checkNameForContextStrategyByTokenOrAncestorSet` \nonly have effect when the `strategy` property is set to `context`, `neverSuppressedChecks` is no such requirement.\n\n#### Properties\n\n | name                                             | description                                                  | type                                                         | default value |\n | ------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------- |\n | file                                             | Specify the location of the patch file.                      | [String](https://checkstyle.sourceforge.io/property_types.html#String) | null          |\n | optional                                         | Control what to do when the file is not existing. If `optional` is set to `false` the file must exist, or else it ends with error. On the other hand if optional is `true` and file is not found, the filter suppresses all audit events. | [boolean](https://checkstyle.sourceforge.io/property_types.html#boolean) | false         |\n | strategy                                         | Control suppression scope that you need. If `startegy` is set to `newline`, it only accepts TreeWalker audit events for TreeWalker Check violations whose line number belong to added lines in patch file. `patchedline` will accept added/changed lines. if `strategy` is set to `context` , for checks listed in `supportContextStrategyChecks`, it will accept violations whose line number belong to added/changed/deleted lines and new code introduces violations outside of added/changed lines, but its child nodes in added/changed lines, for checks not listed in `supportContextStrategyChecks`, it will accept violations whose line number belong to added/changed/deleted lines in patch file. | [String](https://checkstyle.sourceforge.io/property_types.html#String) | newline       |\n | supportContextStrategyChecks                     | String has user defined Checks that support context strategy | [String](https://checkstyle.sourceforge.io/property_types.html#String) | null          |\n | checkNamesForContextStrategyByTokenOrParentSet | String has user defined TreeWalker Checks that need modify violation nodes to their parent node to expand the context scope, split by comma | [String](https://checkstyle.sourceforge.io/property_types.html#String) | null          |\n | checkNamesForContextStrategyByTokenOrAncestorSet | String has user defined TreeWalker Checks that need modify violation nodes to their ancestor node to expand the context scope, split by comma | [String](https://checkstyle.sourceforge.io/property_types.html#String) | null          |\n | neverSuppressedChecks                            | String has user defined TreeWalker Checks to never suppress if files are touched, split by comma. This property is useful for Checks that place violation on whole file or on not all (first/last) occurrence of cause/violated code. | [String](https://checkstyle.sourceforge.io/property_types.html#String) | null          |\n\n#### Notes\n\nCurrently, the following checks support `checkNamesForContextStrategyByTokenOrAncestorSet` property, \nother checks using this property will get the same effect like `checkNamesForContextStrategyByTokenOrParentSet`:\n\n* ArrayTrailingComma\n* AvoidNestedBlocks\n* CommentsIndentation\n* DefaultComesLast\n* DeclarationOrder\n* EqualsHashCode\n* FinalLocalVariable\n* FallThrough\n* RightCurly\n\n#### Notes\n\nCurrently, the following checks will suppress some violations that should not be suppressed when using `supportContextStrategyChecks`. \nAnd you can use `checkNamesForContextStrategyByTokenOrParentSet`, `checkNamesForContextStrategyByTokenOrAncestorSet` \nor `neverSuppressedChecks` to get the larger context scope to solve this problem:\n\n* ParameterNumberCheck\n* SuperClone\n* SuperFinalize\n* BooleanExpressionComplexity\n* OverloadMethodsDeclarationOrder\n* UnnecessarySemicolonInEnumeration\n\nAlso, the following checks will suppress some violations that should not be suppressed when using `supportContextStrategyChecks` or `checkNamesForContextStrategyByTokenOrParentSet`. \nSo you need use `checkNamesForContextStrategyByTokenOrAncestorSet` or `neverSuppressedChecks` to solve this problem:\n\n* ArrayTrailingComma\n* AvoidNestedBlocks\n* CommentsIndentation\n* DefaultComesLast\n* DeclarationOrder\n* EqualsHashCode\n* FinalLocalVariable\n* FallThrough\n* RightCurly\n* VariableDeclarationUsageDistance\n\nThen the following checks will suppress some violations that should not be suppressed unless you use \n`neverSuppressedChecks`:\n\n* CovariantEquals\n* EmptyLineSeparator\n* CustomImportOrder\n* ImportOrder\n* RedundantImport\n* UnusedImports\n* PackageDeclaration\n* MissingJavadocPackage\n* MissingJavadocType\n* OuterTypeNumberCheck\n* OuterTypeFilename\n* NoCodeInFileCheck\n* Regexp\n* AtclauseOrder\n* JavadocMethod\n* JavadocParagraph\n* SummaryJavadoc\n\n#### Examples\n\nFor example, the following configuration fragment directs the Checker to use a SuppressionJavaPatchFilter\nwith patch file config/file.patch and strategy is `newline`:\n```xml\n\u003cmodule name=\"com.puppycrawl.tools.checkstyle.filters.SuppressionJavaPatchFilter\"\u003e\n    \u003cproperty name=\"file\" value=\"config/file.patch\" /\u003e\n    \u003cproperty name=\"strategy\" value=\"newline\" /\u003e\n\u003c/module\u003e\n```\n\nthe following configuration fragment directs the Checker to use a SuppressionJavaPatchFilter\nwith patch file config/file.patch and strategy is `patchedline`:\n```xml\n\u003cmodule name=\"com.puppycrawl.tools.checkstyle.filters.SuppressionJavaPatchFilter\"\u003e\n    \u003cproperty name=\"file\" value=\"config/file.patch\" /\u003e\n    \u003cproperty name=\"strategy\" value=\"patchedline\" /\u003e\n\u003c/module\u003e\n```\n\nthe following configuration fragment direts the Checker to use a SuppressionJavaPatchFilter\nwith patch file config/file.patch, whose strategy is `context`,\nsupport context strategy check `MethodLength` and never suppress checks `EmptyBlock` and `HiddenField`:\n```xml\n\u003cmodule name=\"com.puppycrawl.tools.checkstyle.filters.SuppressionJavaPatchFilter\"\u003e\n    \u003cproperty name=\"file\" value=\"config/file.patch\" /\u003e\n    \u003cproperty name=\"strategy\" value=\"context\" /\u003e\n    \u003cproperty name=\"supportContextStrategyChecks\" value=\"MethodLength,\" /\u003e\n    \u003cproperty name=\"neverSuppressedChecks\" value=\"EmptyBlock,HiddenField\" /\u003e\n\u003c/module\u003e\n```\n\nthe following configuration fragment direts the Checker to use a SuppressionJavaPatchFilter\nwith patch file config/file.patch, whose strategy is `context`,\nexpand `SuperFinalize`'s context scope to parents' node \nand expand `EqualsHashCode`, `FinalLocalVariable`'s context scope to ancestors' node :\n```xml\n\u003cmodule name=\"com.puppycrawl.tools.checkstyle.filters.SuppressionJavaPatchFilter\"\u003e\n    \u003cproperty name=\"file\" value=\"config/file.patch\" /\u003e\n    \u003cproperty name=\"strategy\" value=\"context\" /\u003e\n    \u003cproperty name=\"checkNamesForContextStrategyByTokenOrParentSet\" value=\"SuperFinalize,\" /\u003e\n    \u003cproperty name=\"checkNamesForContextStrategyByTokenOrAncestorSet\" value=\"EqualsHashCode,FinalLocalVariable\" /\u003e\n\u003c/module\u003e\n```\n\n## PatchFilter Report Setup\n\n### Requirements\n\n- [Checkstyle repository](https://github.com/checkstyle) need to be cloned.\n- [Contribution repository](https://github.com/checkstyle/contribution) need to be cloned.\n\n### Clone\n\nJust clone this repository to your local.\n\n```bash\n$ git clone git@github.com:checkstyle/patch-filters.git\n```\n\n### local install\n\nBecause patch-filter has not been merged by Checkstyle, so you should local install this repository——patch-filters\n\n```bash\n$ cd /path/to/patch-filters\n$ mvn clean install\n```\n\nthen checkout to `patch-filter-jar` in contribution repo\n\n```bash\n$ cd /path/to/checkstyle-contribution\n$ git checkout patch-filter-jar\n```\n### set checkstyle-tester\n\nFirstly, you need to do is to modify projects-to-test-on.properties and test project that you want.\nFor example, if I want to test `guava`, then I will only remove # before `guava` (anything that starts with #\nis considered a comment and is ignored.) and remove the specific version to change\n`guava|git|https://github.com/google/guava|v28.2||` to `guava|git|https://github.com/google/guava||`\n, which aims to avoid auto checkout to the specific version in `diff.groovy`.\n\nSecondly, you need to set baseConfig.xml and patchConfig.xml by yourself.\n\n**Attention:**\n\nbaseConfig does not need any checks in it and set `severity` to `ignore`,\nlike `\u003cproperty name=\"severity\" value=\"ignore\"/\u003e`;\n\npatchConfig need Checks and patch-filter, added checks can\nrefer to [here](https://github.com/checkstyle/checkstyle/blob/ec4d06712ab203d31d73c5c6d5c46067f3a6d5b3/config/checkstyle_checks.xml#L60-L190),\nyou can skip Translation Check and checks that reuqires extra config file (Header and RegExpHeader), patchfilter setting is like:\n```xml\n\u003cmodule name=\"com.puppycrawl.tools.checkstyle.filters.SuppressionPatchFilter\"\u003e\n        \u003cproperty name=\"file\" value=\"${checkstyle.patchfilter.patch}\"/\u003e\n\u003c/module\u003e\n```\n\n### Open this repo in IDEA or other IDE\n\nYou can find `GeneratePatchFileLauncher` in `/path/to/patch-filters/src/main/java/com/github/checkstyle/generatepatchfile/`,\nthen add seven follow program arguments in Run/Debug Configurations:\n\n```bash\n# RepoPath of repository that will be checked by checkstyle, here example is guava\npath/to/guava/\n# Path of checkstyle\npath/to/checkstyle/\n# Path of checkstyle-tester\npatch/to/checkstyle-contribution/checkstyle-tester/\n# Patch-branch name of checkstyle, which can be any branch except master, because checkstyle-tester's diff mode\n# not allow the baseBranch and patchBranch have the same name, you can create a new branch based on master which\n# does not need any changes, here is branch name for example patch-filter\npatch-filter\n# path to the base checkstyle configuration file. It will be applied to base branch\npath/to/baseConfig.xml\n# path to the patch checkstyle config file. It will be applied to patch-filter branch\npath/to/patchConfig.xml\n# commit parameter will be used to create patch-filter report\n# if commit parameter is number then the Generator will work in sequence mode,\n# for example if commit parameter is 4, then 3 reports that represent\n# the first three commits in HEAD branch will be created.\n4 # sequence mode\n# Attention: num should be greater than 1, because if num is 1, no report will be created.\n\n# if commit parameter is a comma separated list of commit hashes then the Generator will work in set mode,\n# for example if commit parameter is 86bf3a482c68a3a466b278ae4c7bba4bd7be1d9c,aafac1c6d794750aeba9213e9b15a0b8f0e54f81\n# then 2 report that represent the two commit will be created if they belong to the HEAD branch.\n86bf3a482c68a3a466b278ae4c7bba4bd7be1d9c,aafac1c6d794750aeba9213e9b15a0b8f0e54f81 # set mode\n```\nthen, add Environment variables:\n```bash\ncheckstyle.patchfilter.patch=/path/to/patch-filters/DiffReport/patch.txt\n```\nafter above, if everything is ok, run it and then reports will be created in `/path/to/patch-filters/DiffReport/`.\nfor example, when `repoPath` is guava and `runPatchNum` is 4, then result will look like:\n\n- DiffReport\n  - guava-a1b3c06\n  - guava-bfc1cce\n  - guava-fb6ef19\n  - index.html\n\nby default, `guava` in `guava-a1b3c06` means `repo`'s name, `a1b3c06` in `guava-a1b3c06` means\nthe patch-filter diff report which use patch file between the commit `a1b3c06` and the commit before `a1b3c06`,\nso it represents the commit `a1b3c06`.\n\n[mavenbadge]:https://search.maven.org/search?q=g:%22com.puppycrawl.tools%22%20AND%20a:%patch-filters%22\n[mavenbadge img]:https://img.shields.io/maven-central/v/com.puppycrawl.tools/patch-filters.svg?label=Maven%20Central\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckstyle%2Fpatch-filters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheckstyle%2Fpatch-filters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckstyle%2Fpatch-filters/lists"}