1 view
ankitects/anki
Anki is a smart spaced repetition flashcard program
Rust★ 31,242+174 that day#8 on trending
C55.3/100
Duplication71
4.1% in rust, python, typescript, svelte, bash, sql, c, javascript, perl, swift, ruby, latexDead code38
10.7%Complexity53
46.5% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
2.18%duplicated code · 4,100 of 188,425 lines
378clones in code
1,484code files of 1,686 scanned
2.43%duplicated over all files · 452 clones
Most complex files
- qt/aqt/main.py376 cx
- qt/aqt/addons.py335 cx
- qt/aqt/editor_legacy.py327 cx
- rslib/src/storage/card/mod.rs281 cx
- qt/aqt/browser/sidebar/tree.py270 cx
- rslib/src/search/sqlwriter.rs267 cx
- rslib/src/search/parser.rs250 cx
- qt/aqt/utils.py248 cx
- qt/aqt/mediasrv.py239 cx
- qt/aqt/reviewer.py230 cx
Dead code 10.7% unused · 271 findings
- ts/lib/editable/frame-handle.tsunused-file
- ts/lib/sveltelib/dynamic-slotting.tsunused-file
- ts/lib/components/Select.svelteunused-file
- ts/lib/components/icons.tsunused-file
- ts/lib/components/ItemChooser.svelteunused-file
- ts/lib/components/SpinBox.svelteunused-file
- ts/lib/editable/frame-element.tsunused-file
- ts/routes/card-info/Revlog.svelteunused-file
- ts/lib/components/WithFloating.svelteunused-file
- ts/lib/editable/mathjax-element.svelte.tsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 2 generated files: qt/tools/genhooks_gui.py, rslib/i18n/src/generated.rs.
Largest clones in the code
- 99 lines in 16 placeshtml51 tokensts/lib/components/ButtonGroupItem.svelte:1–99ts/lib/components/EnumSelector.svelte:1–30ts/lib/editable/ContentEditable.svelte:1–44ts/lib/editable/Mathjax.svelte:1–111ts/lib/tag-editor/TagInput.svelte:1–282and 11 more
1<!-- 2 Copyright: Ankitects Pty Ltd and contributors 3 License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html 4--> 5<script context="module" lang="ts"> 6 import type { Writable } from "svelte/store"; 7 import { get, writable } from "svelte/store"; 8 9 import contextProperty from "$lib/sveltelib/context-property"; 10 import type {1<!-- 2Copyright: Ankitects Pty Ltd and contributors 3License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html 4--> 5<script context="module" lang="ts"> 6 export interface Choice<T> { 7 label: string; 8 value: T; 9 } 10</script>First 10 of 99 lines, the second copy on the right.
- 6 lines in 13 placesrust61 tokensrslib/src/card/mod.rs:594–599rslib/src/card/mod.rs:640–644rslib/src/card/mod.rs:728–732rslib/src/card/mod.rs:751–755rslib/src/card/mod.rs:773–777and 8 more
594fn recalculate_memory_state_on_set_deck() -> Result<()> { 595 let mut col = Collection::new(); 596 597 let nt = col.get_notetype_by_name("Basic")?.unwrap(); 598 let mut note = nt.new_note(); 599 col.add_note(&mut note, DeckId(1))?;640fn set_deck_noop_does_not_recompute() -> Result<()> { 641 let mut col = Collection::new(); 642 let nt = col.get_notetype_by_name("Basic")?.unwrap(); 643 let mut note = nt.new_note(); 644 col.add_note(&mut note, DeckId(1))?; - 12 lines in 11 placestypescript55 tokensts/routes/deck-options/AudioOptions.svelte:34–45ts/routes/deck-options/AutoAdvance.svelte:49–60ts/routes/deck-options/BuryOptions.svelte:40–51ts/routes/deck-options/DailyLimits.svelte:144–155ts/routes/deck-options/DisplayOrder.svelte:97–108and 6 more
34 help: tr.deckConfigAlwaysIncludeQuestionAudioTooltip(), 35 }, 36}; 37const helpSections: HelpItem[] = Object.values(settings); 38 39let modal: Modal; 40let carousel: Carousel; 41 42function openHelpModal(index: number): void { 43 modal.show();First 10 of 12 lines.
7 more
- 119 lines in 2 placespython527 tokens
- 84 lines in 7 placeshtml50 tokens
- 10 lines in 4 placesrust81 tokens
- 51 lines in 5 placeshtml54 tokens
- 11 lines in 5 placeshtml53 tokens
- 17 lines in 3 placestypescript99 tokens
- 10 lines in 4 placesrust66 tokens
Largest clones over all files, tests and data included
- 99 lines in 16 placeshtml51 tokensts/lib/components/ButtonGroupItem.svelte:1–99ts/lib/components/EnumSelector.svelte:1–30ts/lib/editable/ContentEditable.svelte:1–44ts/lib/editable/Mathjax.svelte:1–111ts/lib/tag-editor/TagInput.svelte:1–282and 11 more
1<!-- 2 Copyright: Ankitects Pty Ltd and contributors 3 License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html 4--> 5<script context="module" lang="ts"> 6 import type { Writable } from "svelte/store"; 7 import { get, writable } from "svelte/store"; 8 9 import contextProperty from "$lib/sveltelib/context-property"; 10 import type {1<!-- 2Copyright: Ankitects Pty Ltd and contributors 3License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html 4--> 5<script context="module" lang="ts"> 6 export interface Choice<T> { 7 label: string; 8 value: T; 9 } 10</script>First 10 of 99 lines, the second copy on the right.
- 6 lines in 13 placesrust61 tokensrslib/src/card/mod.rs:594–599rslib/src/card/mod.rs:640–644rslib/src/card/mod.rs:728–732rslib/src/card/mod.rs:751–755rslib/src/card/mod.rs:773–777and 8 more
594fn recalculate_memory_state_on_set_deck() -> Result<()> { 595 let mut col = Collection::new(); 596 597 let nt = col.get_notetype_by_name("Basic")?.unwrap(); 598 let mut note = nt.new_note(); 599 col.add_note(&mut note, DeckId(1))?;640fn set_deck_noop_does_not_recompute() -> Result<()> { 641 let mut col = Collection::new(); 642 let nt = col.get_notetype_by_name("Basic")?.unwrap(); 643 let mut note = nt.new_note(); 644 col.add_note(&mut note, DeckId(1))?; - 12 lines in 11 placestypescript55 tokensts/routes/deck-options/AudioOptions.svelte:34–45ts/routes/deck-options/AutoAdvance.svelte:49–60ts/routes/deck-options/BuryOptions.svelte:40–51ts/routes/deck-options/DailyLimits.svelte:144–155ts/routes/deck-options/DisplayOrder.svelte:97–108and 6 more
34 help: tr.deckConfigAlwaysIncludeQuestionAudioTooltip(), 35 }, 36}; 37const helpSections: HelpItem[] = Object.values(settings); 38 39let modal: Modal; 40let carousel: Carousel; 41 42function openHelpModal(index: number): void { 43 modal.show();First 10 of 12 lines.
- 119 lines in 2 placespython527 tokens
- 31 lines in 2 placesmarkupmarkup381 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 382 | 83,730 | 201 | 1,918 | 2.29% |
| typescript | 381 | 27,727 | 75 | 876 | 3.16% |
| html | 207 | 7,213 | 65 | 682 | 9.46% |
| python | 148 | 45,079 | 36 | 584 | 1.3% |
| sql | 34 | 892 | 1 | 40 | 4.48% |
| svelte | 212 | 19,445 | 0 | 0 | 0% |
| scss | 75 | 1,951 | 0 | 0 | 0% |
| bash | 24 | 1,091 | 0 | 0 | 0% |
| c | 1 | 337 | 0 | 0 | 0% |
| javascript | 7 | 263 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 354 | 79,440 | 195 | 1,870 | 2.35% |
| typescript | 403 | 30,752 | 98 | 1,151 | 3.74% |
| html | 207 | 7,213 | 65 | 682 | 9.46% |
| python | 187 | 53,222 | 46 | 692 | 1.3% |
| yaml | 12 | 2,331 | 25 | 404 | 17.33% |
| json | 10 | 5,936 | 11 | 199 | 3.35% |
| markup | 14 | 304 | 4 | 67 | 22.04% |
| scss | 114 | 4,419 | 3 | 70 | 1.58% |
| markdown | 31 | 2,972 | 2 | 14 | 0.47% |
| bash | 28 | 1,176 | 1 | 8 | 0.68% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 19, 2026 | #8 | 31,242 (+174) | 1,686 | 214,448 | 452 | 2.43% | 2.18% | C 55.3 | 754ce3a |
| Sep 17, 2026 | #7 | 30,950 (+58) | 1,684 | 214,123 | 451 | 2.43% | 2.18% | — | 6f7a317 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.