{"by":"91awebsi","descendants":8,"id":49804359,"kids":[49836730,49836069,49837505,49840497,49804360],"score":75,"text":"treepeat is a tool that finds similarities in your codebase.<p>Find duplicate code blocks meaningful to the language (classes&#x2F;functions), not just lines.<p>Find near-duplicates: ignore whitespace, strings, high level AST nodes such as function and names.<p>Find structurally similar code: anonymize identifiers, constants, etc.<p>Pull requests welcome: This is very much an proof of concept - I&#x27;m happy with it, but I haven&#x27;t supported very many languages at present.<p>Languages supported: astro, bash, css, go, html, javascript, lua, markdown (plus codeblocks), python, sql, typescript, java, kotlin, rust, yaml","time":1790096005,"title":"Show HN: Treepeat – Code similarity detection using Tree-sitter","type":"story","url":"https://github.com/dsummersl/treepeat"}