{"id":19359888,"url":"https://github.com/codacy/codacy-plugins-test","last_synced_at":"2026-02-12T19:06:52.690Z","repository":{"id":35639517,"uuid":"39913866","full_name":"codacy/codacy-plugins-test","owner":"codacy","description":"Testing interface for external docker tools","archived":false,"fork":false,"pushed_at":"2026-02-06T11:28:03.000Z","size":13210,"stargazers_count":6,"open_issues_count":0,"forks_count":7,"subscribers_count":15,"default_branch":"master","last_synced_at":"2026-02-07T21:48:29.787Z","etag":null,"topics":["codacy","docker","plugins","plugins-test","review","test","test-automation","testing","testing-tool"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/codacy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-07-29T20:09:49.000Z","updated_at":"2025-08-05T09:32:38.000Z","dependencies_parsed_at":"2023-12-13T12:27:20.758Z","dependency_job_id":"531e6c1b-dfab-4405-bfd6-fb9cd3501163","html_url":"https://github.com/codacy/codacy-plugins-test","commit_stats":null,"previous_names":[],"tags_count":151,"template":false,"template_full_name":null,"purl":"pkg:github/codacy/codacy-plugins-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-plugins-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-plugins-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-plugins-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-plugins-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codacy","download_url":"https://codeload.github.com/codacy/codacy-plugins-test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-plugins-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29377993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T19:05:20.189Z","status":"ssl_error","status_checked_at":"2026-02-12T19:01:44.216Z","response_time":55,"last_error":"SSL_read: 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":["codacy","docker","plugins","plugins-test","review","test","test-automation","testing","testing-tool"],"created_at":"2024-11-10T07:16:26.891Z","updated_at":"2026-02-12T19:06:52.684Z","avatar_url":"https://github.com/codacy.png","language":"Scala","readme":"[![Codacy Badge](https://api.codacy.com/project/badge/Grade/77e0473f417446a78758f02785a705b8)](https://www.codacy.com/gh/codacy/codacy-plugins-test?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=codacy/codacy-plugins-test\u0026amp;utm_campaign=Badge_Grade)\n[![Build Status](https://circleci.com/gh/codacy/codacy-plugins-test.svg?style=shield\u0026circle-token=:circle-token)](https://circleci.com/gh/codacy/codacy-plugins-test)\n\n\u003e [!IMPORTANT]  \n\u003e This repository depends on a package published by [`codacy-analysis-cli`](https://github.com/codacy/codacy-analysis-cli).\n\u003e Since that repository is now deprecated and no longer maintained we should eventually move only the necessary code here,\n\u003e allowing us to depend directly on [`codacy-plugins-api`](https://github.com/codacy/codacy-plugins-api/) and [`codacy-plugins`](https://github.com/codacy/codacy-plugins/).\n\u003e \n\u003e While that is not done, we can't test SBOM generation in tools.\n\u003e We have no desire to do breaking version updates of plugins dependencies on the deprecated `codacy-analysis-cli`.\n\n# Codacy Plugins Test\n\nProvide a testing interface for the external docker tools.\n\n## Test definition\n\nThe test files should be placed in `/docs/tests` on the docker of the tool being tested.\n\n**Definition**\n\n```javascript\n//#Patterns: \u003cPATTERN_NAME\u003e : { \"\u003cPARAMETER_NAME\u003e\": \"\u003cPARAMETER_VALUE\u003e\" }\n\nvar people = {};\n//#\u003cPATTERN_LEVEL\u003e: \u003cPATTERN_NAME\u003e\nfor (var i = 0, person; (person = people[i]); i++) {}\n\nvar variable;\nfunction test() {\n  //#\u003cPATTERN_LEVEL\u003e: \u003cPATTERN_NAME\u003e\n  return (variable = \"test\");\n}\n```\n\n**Example:**\n\n```javascript\n//#Patterns: boss\n\nvar people = {};\n//#Warn: boss\nfor (var i = 0, person; (person = people[i]); i++) {}\n\nvar variable;\nfunction test() {\n  //#Warn: boss\n  return (variable = \"test\");\n}\n```\n\nYou can also look for multiple patterns in the same file, just separate them\nwith a comma:\n\n**Example:**\n\n```javascript\n//#Patterns: big, boss\nvar people = {};\n//#Warn: big\nfor (var i = 0, person; (person = people[i]); i++) {}\n\nvar variable;\nfunction test() {\n  //#Warn: boss\n  return (variable = \"test\");\n}\n```\n\nInstead of commenting in the line before the error, you can alternatively\nspecify the line of the warning with this syntax:\n\n    \u003cLANGUAGE_COMMENT\u003e#Issue: {\"severity\": \"\u003cERROR_LEVEL\u003e\", \"line\": \u003cLINE_NUMBER_WITH_ISSUE\u003e, \"patternId\": \"PATTERN_ID\"}\n\n**Example:**\n\n```javascript\n//#Patterns: design_tag_todo\n//#Issue: {\"severity\": \"Info\", \"line\": 3, \"patternId\": \"design_tag_todo\"}\n\nvar people = {};\n//TODO: remove empty for\nfor (var i = 0, person; (person = people[i]); i++) {}\n\nvar variable;\n```\n\n## Multiple test definition\n\nThe multiple tests are defined inside the `/docs/tests/multiple-tests/` directory of the tool's docker image being tested.\n\nYou can have a subdirectory of `/docs/tests/multiple-tests/` for every run of the tool.\n\nFor example, you can add two subdirectories like these:\n\n-   `with-config-file`\n-   `without-config-file`\n\nTo check that the tool works with native configuration file (for example `.eslintrc.json`) and with Codacy configuration.\n\nEach test folder should have a `src` directory (containining the source files to test and the tool's native\nconfiguration (if it exists)), two files named `patterns.xml` and `results.xml` with the following structure:\n\n### `patterns.xml` Structure\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\n\u003cmodule name=\"root\"\u003e\n    \u003cproperty name=\"tool-extra-parameter-name\" value=\"tool-extra-parameter-value\" /\u003e\n    \u003cmodule name=\"rule-name\" /\u003e\n    \u003cmodule name=\"rule-with-parameters\"\u003e\n        \u003cproperty name=\"parameter-key\" value=\"parameter-value\" /\u003e\n    \u003c/module\u003e\n    \u003c!-- To ignore config files from analysis --\u003e\n    \u003cmodule name=\"BeforeExecutionExclusionFileFilter\"\u003e\n        \u003c!-- value can be a regex matching files to ignore --\u003e\n        \u003cproperty name=\"fileNamePattern\" value=\"config-file\\.xml\"/\u003e\n    \u003c/module\u003e\n\u003c/module\u003e\n```\n\n### `results.xml` Structure\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003ccheckstyle version=\"4.3\"\u003e\n    \u003cfile name=\"file-name.ext\"\u003e \u003c!-- severity can be one of info, warning or error --\u003e\n        \u003cerror source=\"rule-name\" line=\"20\" message=\"reported message from the tool\" severity=\"info|warning|error\" /\u003e\n    \u003c/file\u003e\n\u003c/checkstyle\u003e\n```\n\n## Usage\n\n### JsonTests\n\nChecks if the patterns definitions are in the correct format\n\n```sh\nsbt \"runMain codacy.plugins.DockerTest json \u003cDOCKER_NAME\u003e:\u003cDOCKER_VERSION\u003e\"\n```\n\nOptions:\n\n-   `codacy.tests.ignore.descriptions` - if this variable is defined we do not check if all the patterns have descriptions\n\n### PatternTests\n\nCheck if all the patterns defined in the test files occur in the specified line\n\n```sh\nsbt \"runMain codacy.plugins.DockerTest pattern \u003cDOCKER_NAME\u003e:\u003cDOCKER_VERSION\u003e\"\n```\n\nOptions:\n\n-   `codacy.tests.languages` - languages supported by the tool. If this option isn't provided, the languages\n    will be inferred from the test files. Example: `-Dcodacy.tests.languages=ruby,java,javascript`\n\nAlternatively, you can run a specific test file:\n\n```sh\nsbt \"runMain codacy.plugins.DockerTest pattern \u003cDOCKER_NAME\u003e:\u003cDOCKER_VERSION\u003e no-curly-brackets\"\n```\n\n### MetricsTests\n\nCheck if the metrics defined in the test files match with same complexieties in the specified lines\n\n```sh\nsbt \"runMain codacy.plugins.DockerTest metrics \u003cDOCKER_NAME\u003e:\u003cDOCKER_VERSION\u003e\"\n```\n\n### MultipleTests\n\nCheck if the tool runs with multiple patterns and test files at the same time and configuration file behavior as well\n\n```sh\nsbt \"runMain codacy.plugins.DockerTest multiple \u003cDOCKER_NAME\u003e:\u003cDOCKER_VERSION\u003e\"\n```\n\nOptions:\n\n- `--only` by adding this flag, followed by the folder name, you can run a single test of the multiple folder ``` sbt \"runMain codacy.plugins.DockerTest multiple \u003cDOCKER_NAME\u003e:\u003cDOCKER_VERSION\u003e\" --only \u003cfolderName\u003e ```\n\n\n## Docs\n\nInformation about the integration with external analysis tools at Codacy available [here](https://github.com/codacy/codacy-engine-scala-seed#docs).\n\n## Troubleshooting\n\n\u003e OSx\n\nChange the java tmp dir to your home so that boot2docker can access the tmp files\n\n```sh\n-Djava.io.tmpdir=$HOME/tmp\n```\n\n## What is Codacy?\n\n[Codacy](https://www.codacy.com/) is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.\n\n### Among Codacy’s features:\n\n-   Identify new Static Analysis issues\n-   Commit and Pull Request Analysis with GitHub, BitBucket/Stash, GitLab (and also direct git repositories)\n-   Auto-comments on Commits and Pull Requests\n-   Integrations with Slack, HipChat, Jira, YouTrack\n-   Track issues in Code Style, Security, Error Proneness, Performance, Unused Code and other categories\n\nCodacy also helps keep track of Code Coverage, Code Duplication, and Code Complexity.\n\nCodacy supports PHP, Python, Ruby, Java, JavaScript, and Scala, among others.\n\n### Free for Open Source\n\nCodacy is free for Open Source projects.\n\n## License\n\nLicensed under the MIT License terms.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodacy%2Fcodacy-plugins-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodacy%2Fcodacy-plugins-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodacy%2Fcodacy-plugins-test/lists"}