dannote

dannote / ex_dna

Public

Code duplication detector for Elixir, powered by native AST analysis

11
0
100% credibility
Found Mar 08, 2026 at 11 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Elixir
AI Summary

ExDNA detects duplicated code blocks in Elixir projects by analyzing their structure, categorizing clones, and suggesting specific refactorings like extracting functions or behaviors.

How It Works

1
🕵️‍♀️ Notice copy-paste

While working on your project, you spot the same chunks of code repeated in different spots, making it harder to update.

2
📦 Bring in the finder

You add this simple duplication spotter to your project's helper tools with just a quick line.

3
🔍 Scan your code

You run a quick check on your main code folders to hunt for repeats.

4
💡 See the matches

It highlights all the duplicate sections—even sneaky ones with renamed bits—and gives friendly ideas on how to merge them into one reusable piece.

5
🛠️ Refactor easily

Follow the smart suggestions to pull out shared functions or patterns, replacing copies with simple calls.

6
🔄 Hook into your editor

Set it up to warn you right in your coding app as you type, catching duplicates on the spot.

Enjoy tidy code

Your project feels lighter and smarter, with no hidden repeats slowing you down or risking bugs.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 11 to 11 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is ex_dna?

ex_dna is a code duplication detector for Elixir projects, scanning your codebase via native AST analysis to spot exact copies, renamed variables, and near-miss clones. Unlike text-based tools, it normalizes pipes and suggests refactors like extracting functions, macros, or behaviours—run `mix ex_dna lib/` for console/JSON/HTML reports with code duplication examples. Add it as a Mix compiler for incremental checks on changes.

Why is it gaining traction?

It beats SonarQube-style metrics by grasping Elixir structure for precise code duplication detection, including code duplication in microservices or tests, without false positives from readability tweaks. LSP server pushes diagnostics to editors like Neovim, and Credo integration reuses parsed ASTs for zero-overhead upgrades. Actionable suggestions turn duplication metrics into fixes devs actually apply.

Who should use this?

Elixir backend engineers refactoring Phoenix apps with repeated changeset logic or view helpers. Teams auditing code duplication in tests or microservices via CI. Credo users seeking deeper analysis beyond basic duplicated code checks.

Verdict

Strong pick for Elixir code duplication detection in growing repos—CLI, LSP, and outputs shine despite 11 stars and 1.0% credibility score. Early maturity means light testing; integrate now if docs match your workflow, but pair with established linters.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.