{"id":13764123,"url":"https://github.com/mibk/dupl","last_synced_at":"2025-06-30T01:37:48.969Z","repository":{"id":32381426,"uuid":"35957769","full_name":"mibk/dupl","owner":"mibk","description":"a tool for code clone detection","archived":false,"fork":false,"pushed_at":"2024-03-20T14:09:47.000Z","size":99,"stargazers_count":349,"open_issues_count":4,"forks_count":24,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-10T17:41:38.921Z","etag":null,"topics":["code-clones","go","golang","golang-tools","tool"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mibk.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}},"created_at":"2015-05-20T15:45:15.000Z","updated_at":"2025-04-14T15:11:01.000Z","dependencies_parsed_at":"2024-06-18T13:38:28.520Z","dependency_job_id":"aaa281fe-58a5-4e29-b07d-99299ec8ccfd","html_url":"https://github.com/mibk/dupl","commit_stats":{"total_commits":110,"total_committers":7,"mean_commits":"15.714285714285714","dds":"0.054545454545454564","last_synced_commit":"1bf052b6e6431cb666549323351baf3b2aa741e4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mibk/dupl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mibk%2Fdupl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mibk%2Fdupl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mibk%2Fdupl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mibk%2Fdupl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mibk","download_url":"https://codeload.github.com/mibk/dupl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mibk%2Fdupl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262694476,"owners_count":23349854,"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":["code-clones","go","golang","golang-tools","tool"],"created_at":"2024-08-03T15:01:14.728Z","updated_at":"2025-06-30T01:37:48.939Z","avatar_url":"https://github.com/mibk.png","language":"Go","readme":"# dupl [![Build Status](https://travis-ci.org/mibk/dupl.png)](https://travis-ci.org/mibk/dupl)\n\n**dupl** is a tool written in Go for finding code clones. So far it can find clones only\nin the Go source files. The method uses suffix tree for serialized ASTs. It ignores values\nof AST nodes. It just operates with their types (e.g. `if a == 13 {}` and `if x == 100 {}` are\nconsidered the same provided it exceeds the minimal token sequence size).\n\nDue to the used method dupl can report so called \"false positives\" on the output. These are\nthe ones we do not consider clones (whether they are too small, or the values of the matched\ntokens are completely different).\n\n## Installation\n\n```bash\ngo get -u github.com/mibk/dupl\n```\n\n## Usage\n\n```\nUsage of dupl:\n  dupl [flags] [paths]\n\nPaths:\n  If the given path is a file, dupl will use it regardless of\n  the file extension. If it is a directory it will recursively\n  search for *.go files in that directory.\n\n  If no path is given dupl will recursively search for *.go\n  files in the current directory.\n\nFlags:\n  -files\n        read file names from stdin one at each line\n  -html\n        output the results as HTML, including duplicate code fragments\n  -plumbing\n        plumbing (easy-to-parse) output for consumption by scripts or tools\n  -t, -threshold size\n        minimum token sequence size as a clone (default 15)\n  -vendor\n        check files in vendor directory\n  -v, -verbose\n        explain what is being done\n\nExamples:\n  dupl -t 100\n        Search clones in the current directory of size at least\n        100 tokens.\n  dupl $(find app/ -name '*_test.go')\n        Search for clones in tests in the app directory.\n  find app/ -name '*_test.go' |dupl -files\n        The same as above.\n```\n\n## Example\n\nThe reduced output of this command with the following parameters for the [Docker](https://www.docker.com) source code\nlooks like [this](http://htmlpreview.github.io/?https://github.com/mibk/dupl/blob/master/_output_example/docker.html).\n\n```bash\n$ dupl -t 200 -html \u003edocker.html\n```\n","funding_links":[],"categories":["Code Analysis","Programming Languages","代码分析","Linters","相关工具`go相关工具和插件`","相关工具","代碼分析","Libraries for creating HTTP middlewares","Libraries"],"sub_categories":["Routers","路由器","Style and Patterns Checking","Middlewares","Contents","代码分析","路由"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmibk%2Fdupl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmibk%2Fdupl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmibk%2Fdupl/lists"}