{"id":20410595,"url":"https://github.com/acanda/code-analysis-maven-plugin","last_synced_at":"2025-04-12T16:03:05.010Z","repository":{"id":37042571,"uuid":"405038759","full_name":"acanda/code-analysis-maven-plugin","owner":"acanda","description":"Coan is a code analysis Maven plugin that runs Checkstyle and PMD and generates a single page HTML report.","archived":false,"fork":false,"pushed_at":"2024-10-21T17:22:57.000Z","size":417,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-22T05:23:46.956Z","etag":null,"topics":["checkstyle","code-analysis","hacktoberfest","maven-plugin","pmd","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acanda.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2021-09-10T10:14:00.000Z","updated_at":"2024-10-21T17:22:38.000Z","dependencies_parsed_at":"2023-02-15T22:45:41.082Z","dependency_job_id":"8287b33d-0d09-41ce-bc9b-5eebdca3cf7d","html_url":"https://github.com/acanda/code-analysis-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acanda%2Fcode-analysis-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acanda%2Fcode-analysis-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acanda%2Fcode-analysis-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acanda%2Fcode-analysis-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acanda","download_url":"https://codeload.github.com/acanda/code-analysis-maven-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224737181,"owners_count":17361345,"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","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":["checkstyle","code-analysis","hacktoberfest","maven-plugin","pmd","static-analysis"],"created_at":"2024-11-15T05:47:13.704Z","updated_at":"2025-04-12T16:03:05.003Z","avatar_url":"https://github.com/acanda.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Coan - Code Analysis Maven Plugin\n:plugin-version: 1.17.0\n:idprefix:\n:idseparator: -\n\nCoan is a code analysis Maven plugin that runs Checkstyle and PMD and generates a single page HTML report.\nYou can either generate an individual report for each module or an aggregated report for all modules in a Maven project.\nIt also logs the issues it finds to the console with links that are clickable and open the respective file in IntelliJ IDEA.\n\n== Usage\n\n=== Analyse a single Maven project or module\n\nYou can create a report for a single Maven project or module with the goal `analyse`.\nIf you put the following configuration into the parent pom of a multi-module project, then plugin will generate a separate report for each module.\n\n[source,xml,subs=\"attributes+\"]\n----\n\u003cbuild\u003e\n    \u003cplugins\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003ech.acanda.maven\u003c/groupId\u003e\n            \u003cartifactId\u003ecode-analysis-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e{plugin-version}\u003c/version\u003e\n            \u003cexecutions\u003e\n                \u003cexecution\u003e\n                    \u003cid\u003eanalyse-code\u003c/id\u003e\n                    \u003cphase\u003everify\u003c/phase\u003e \u003c!--1--\u003e\n                    \u003cgoals\u003e\n                        \u003cgoal\u003eanalyse\u003c/goal\u003e\n                    \u003c/goals\u003e\n                \u003c/execution\u003e\n            \u003c/executions\u003e\n            \u003cconfiguration\u003e \u003c!--2--\u003e\n                \u003cskip\u003efalse\u003c/skip\u003e\n                \u003cfailOnIssues\u003etrue\u003c/failOnIssues\u003e\n                \u003cpmdConfigPath\u003econfig/pmd.xml\u003c/pmdConfigPath\u003e\n                \u003ccheckstyleConfigPath\u003econfig/checkstyle.xml\u003c/checkstyleConfigPath\u003e\n                \u003ctargetPath\u003e${project.build.directory}/code-analysis\u003c/targetPath\u003e\n                \u003creportFormats\u003ehtml\u003c/reportFormats\u003e\n            \u003c/configuration\u003e\n        \u003c/plugin\u003e\n    \u003c/plugins\u003e\n\u003c/build\u003e\n----\n\n\u003c1\u003e The default phase is `verify`.\nThis can be omitted unless you want to run the plugin in another phase.\n\u003c2\u003e All configuration parameters are optional.\nThe values in this example are the default values.\n\n=== Aggregated reports for multi-module projects\n\nYou can create an aggregated report for a multi-module Maven project with the goal `aggregate`.\nThe goal `aggregate` is not bound to a phase by default as this goal is not meant to be invoked as part of a build but individually with `mvn ch.acanda.maven:code-analysis-maven-plugin:aggregate`.\nIf you need to change the configuration, then you can do this by either directly setting the properties on the CLI, e.g.\n\n[source,bash]\n----\nmvn ch.acanda.maven:code-analysis-maven-plugin:aggregate -Dcoan.failOnIssues=false\n----\n\nor by adding a build plugin configuration without a goal as shown below.\n\n[source,xml,subs=\"attributes+\"]\n----\n\u003cbuild\u003e\n    \u003cplugins\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003ech.acanda.maven\u003c/groupId\u003e\n            \u003cartifactId\u003ecode-analysis-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e{plugin-version}\u003c/version\u003e\n            \u003cconfiguration\u003e \u003c!--1--\u003e\n                \u003cskip\u003efalse\u003c/skip\u003e\n                \u003cfailOnIssues\u003etrue\u003c/failOnIssues\u003e\n                \u003cpmdConfigPath\u003econfig/pmd.xml\u003c/pmdConfigPath\u003e\n                \u003ccheckstyleConfigPath\u003econfig/checkstyle.xml\u003c/checkstyleConfigPath\u003e\n                \u003ctargetPath\u003e${project.build.directory}/code-analysis\u003c/targetPath\u003e\n                \u003creportFormats\u003ehtml\u003c/reportFormats\u003e\n            \u003c/configuration\u003e\n        \u003c/plugin\u003e\n    \u003c/plugins\u003e\n\u003c/build\u003e\n----\n\n\u003c1\u003e All configuration parameters are optional.\nThe values in this example are the default values.\n\n=== Configuration Parameters\n\nAll parameters are optional.\n\nskip::\nSkips the execution when set to `true`. +\nDefault value: `false` +\nProperty: `coan.skip`\n\nfailOnIssues::\nFails the build if any of the code analysers finds any issues.\nIf you run Maven with `--fail-at-end`, then the build will not immediately fail but only at the end of the build. +\nDefault value: `true` +\nProperty: `coan.failOnIssues`\n\npmdConfigPath::\nThe path to the PMD configuration file.\nThis can be an absolute or relative path.\nIf the path is relative, then the plugin tries to resolve it against the base path of the project or module that it is analysing.\nIf it cannot resolve the path, then it recursively tries to resolve it against the parent projects.\nThis allows you to have both a global configuration in a parent project and special configurations for selected modules. +\nDefault value: `config/pmd.xml` +\nProperty: `coan.pmd.configPath`\n\ncheckstyleConfigPath::\nThe path to the Checkstyle configuration file.\nThis can be an absolute or relative path.\nIf the path is relative, then the plugin tries to resolve it against the base path of the project or module that it is analysing.\nIf it cannot resolve the path, then it recursively tries to resolve it against the parent projects.\nThis allows you to have both a global configuration in a parent project and special configurations for selected modules. +\nDefault value: `config/checkstyle.xml` +\nProperty: `coan.checkstyle.configPath`\n\ntargetPath::\nThe working directory of the plugin.\nThe final report(s), e.g. `report.html`, will be saved in this directory as well as some other temporary files. +\nDefault value: `${project.build.directory}/code-analysis` +\nProperty: `coan.targetPath`\n\nreportFormats::\nThe plugin can create reports in different formats.\nThis parameter contains a comma separated list of formats.\nThe plugin detects when it is run as part of a GitHub workflow and automatically appends the report to the job's summary.\n+\nDefault value: `html` +\nProperty: `coan.report.formats` +\n+\nThe supported formats are `html`, `gitlab` and `github`:\n\nhtml:::\nCreates an HTML report `report.html` that lists all issues the plugin found.\ngitlab:::\nCreates a GitLab Code Quality report `report.gitlab.json` that you can attach as an artifact to your GitLab CI/CD job so the issues the plugin found are summarized in merge requests and the pipeline view, see https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsreportscodequality[artifacts:reports:codequality].\ngithub:::\nThe plugin detects when it is run as part of a GitHub workflow and automatically appends the report to the job's summary without adding this format.\nYou only have to add `github` if you want to store the report in `report.github.md`.\n\n== Build Status\n\nimage:https://github.com/acanda/code-analysis-maven-plugin/actions/workflows/build.yaml/badge.svg[\"GitHub Actions Build Status\",link=\"https://github.com/acanda/code-analysis-maven-plugin/actions/workflows/build.yaml\"]\nimage:https://sonarcloud.io/api/project_badges/measure?project=acanda_code-analysis-maven-plugin\u0026metric=alert_status[\"Sonar Quality Gate Status\",link=\"https://sonarcloud.io/dashboard?id=acanda_code-analysis-maven-plugin\"]\nimage:https://sonarcloud.io/api/project_badges/measure?project=acanda_code-analysis-maven-plugin\u0026metric=security_rating[\"Sonar Security Rating\",link=\"https://sonarcloud.io/component_measures?id=acanda_code-analysis-maven-plugin\u0026metric=Security\u0026view=list\"]\nimage:https://sonarcloud.io/api/project_badges/measure?project=acanda_code-analysis-maven-plugin\u0026metric=reliability_rating[\"Sonar Reliability Rating\",link=\"https://sonarcloud.io/component_measures?id=acanda_code-analysis-maven-plugin\u0026metric=Reliability\u0026view=list\"]\nimage:https://sonarcloud.io/api/project_badges/measure?project=acanda_code-analysis-maven-plugin\u0026metric=sqale_rating[\"Sonar Maintainability Rating\",link=\"https://sonarcloud.io/component_measures?id=acanda_code-analysis-maven-plugin\u0026metric=Maintainability\u0026view=list\"]\nimage:https://sonarcloud.io/api/project_badges/measure?project=acanda_code-analysis-maven-plugin\u0026metric=vulnerabilities[\"Sonar Vulnerabilites\",link=\"https://sonarcloud.io/project/issues?id=acanda_code-analysis-maven-plugin\u0026resolved=false\u0026types=VULNERABILITY\"]\nimage:https://sonarcloud.io/api/project_badges/measure?project=acanda_code-analysis-maven-plugin\u0026metric=bugs[\"Sonar Bugs\",link=\"https://sonarcloud.io/project/issues?id=acanda_code-analysis-maven-plugin\u0026resolved=false\u0026types=BUG\"]\n\n== License\n\nThe Code Analysis Maven Plugin is licensed under the http://www.apache.org/licenses/LICENSE-2.0[Apache License, Version 2.0].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facanda%2Fcode-analysis-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facanda%2Fcode-analysis-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facanda%2Fcode-analysis-maven-plugin/lists"}