{"id":19359874,"url":"https://github.com/codacy/codacy-duplication-scala-seed","last_synced_at":"2026-05-15T17:34:28.924Z","repository":{"id":56616203,"uuid":"52018079","full_name":"codacy/codacy-duplication-scala-seed","owner":"codacy","description":"Library to integrate duplication tools in Codacy","archived":false,"fork":false,"pushed_at":"2023-08-31T11:38:07.000Z","size":92,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-02-16T11:28:00.045Z","etag":null,"topics":["codacy","docker","duplication","scala","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codacy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2016-02-18T15:41:56.000Z","updated_at":"2023-08-29T15:15:48.000Z","dependencies_parsed_at":"2025-01-06T18:49:57.985Z","dependency_job_id":"723fa09b-2787-449b-8240-f6ddeeeac13a","html_url":"https://github.com/codacy/codacy-duplication-scala-seed","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-duplication-scala-seed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-duplication-scala-seed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-duplication-scala-seed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-duplication-scala-seed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codacy","download_url":"https://codeload.github.com/codacy/codacy-duplication-scala-seed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240475237,"owners_count":19807292,"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":["codacy","docker","duplication","scala","static-analysis"],"created_at":"2024-11-10T07:16:25.662Z","updated_at":"2026-05-15T17:34:23.889Z","avatar_url":"https://github.com/codacy.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codacy Duplication Scala Seed\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b85f7d351cd44a96ad95dbbff1305ccc)](https://www.codacy.com/gh/codacy/codacy-duplication-scala-seed?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=codacy/codacy-duplication-scala-seed\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/b85f7d351cd44a96ad95dbbff1305ccc)](https://www.codacy.com/gh/codacy/codacy-duplication-scala-seed?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=codacy/codacy-duplication-scala-seed\u0026utm_campaign=Badge_Coverage)\n[![Build Status](https://circleci.com/gh/codacy/codacy-duplication-scala-seed.svg?style=shield\u0026circle-token=:circle-token)](https://circleci.com/gh/codacy/codacy-duplication-scala-seed)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.codacy/codacy-duplication-scala-seed_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.codacy/codacy-duplication-scala-seed_2.12)\n\nWe use external tools at Codacy, this is the library we use across the multiple external tools integrations.\nFor more details and examples of tools that use this project, you can check\n`TODO`.\n\n## Usage\n\nAdd to your SBT dependencies:\n\n```scala\n\"com.codacy\" %% \"codacy-duplication-scala-seed\" % \"1.0.0-SNAPSHOT\"\n```\n\nYou shouldn't worry about the library itself, we use it as a core in our tools,\nand everything is well explained in our Docs section.\n\n## Docs\n\n### How to integrate an external duplication tool on Codacy\n\nBy creating a docker and writing code to handle the tool invocation and output,\nyou can integrate the tool of your choice on Codacy!\n\n\u003e To know more about dockers, and how to write a docker file please refer to [https://docs.docker.com/reference/builder/](https://docs.docker.com/reference/builder/)\n\nWe use external tools at Codacy, in this tutorial, we explain how you can integrate the duplication tool of your choice in Codacy.\nYou can check the code of an already implemented tool and if you wish fork it to start yours.\nYou are free to modify it and use it for your integration.\n\n## Requirements\n\n* Docker definition with the tool you want to integrate\n\n## Assumptions and Behaviour\n\n* To run the tool we provide the configuration file, `/src/.codacyrc`, with the language to run and optional parameters your tool might need.\n* The files to analyse are located in `/src`, meaning that when provided in the configuration, the paths are relative to `/src.\n\n* **.codacyrc**\n  * **duplication:**\n    * **language:** Language to run the tool\n    * **params:** Object with key/value parameters\n\n```json\n{\n  \"duplication\": {\n    \"language\": \"Scala\",\n    \"params\": {\n      \"maxTokens\": 5\n    }\n  }\n}\n```\n\n## Output\n\nYou are free to write this code in the language you want.\nAfter you have your results from the tool, you should print them to the standard output in our **Result** format, one result per line.\n\n```json\n{\n  \"cloneLines\": \"case class Foo(bar: Int)\",\n  \"nrTokens\": 2,\n  \"nrLines\": 1,\n  \"files\": [\n    { \"filePath\": \"path/to/my/file1.scala\", \"startLine\": 1, \"endLine\": 2 },\n    { \"filePath\": \"path/to/my/file2.scala\", \"startLine\": 5, \"endLine\": 6 }\n  ]\n}\n```\n\n\u003e The filename should not include the prefix `/src/`\n\u003e Example:\n\u003e * absolute path: `/src/folder/file.js`\n\u003e * filename path: `folder/file.js`\n\n## Submit the Docker\n\n### Running the docker\n\n```sh\ndocker run -t \\\n    --net=none \\\n    --privileged=false \\\n    --cap-drop=ALL \\\n    --user=docker \\\n    --rm=true \\\n    -v \u003cPATH-TO-FOLDER-WITH-FILES-TO-CHECK\u003e:/src \\\n    -v \u003cPATH-TO-CODACY-CONFIG-RC\u003e:/src/.codacyrc \\\n    \u003cYOUR-DOCKER-NAME\u003e:\u003cYOUR-DOCKER-VERSION\u003e\n```\n\n### Docker restrictions\n\n* Docker image size should not exceed 500MB\n* Docker should contain a non-root user named docker with UID/GID 2004\n* All the source code of the docker must be public\n* The docker base must officially supported on DockerHub\n* Your docker must be provided in a repository through a public git host (ex: GitHub, Bitbucket, ...)\n\n### Docker submission\n\n* To submit the docker you should send an email to `team [at] codacy [dot] com` with the link to the git repository with your docker definition.\n* The docker will then be subjected to a review by our team and you will then be contacted with more details\n\nIf you have any question or suggestion regarding this guide let us know.\n\n## Test\n\n\u003e TODO\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodacy%2Fcodacy-duplication-scala-seed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodacy%2Fcodacy-duplication-scala-seed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodacy%2Fcodacy-duplication-scala-seed/lists"}