3 views
pollen-robotics/microduck
A Tiny biped duck robot 🦆
Rust★ 12,517+843 that day#5 on trending
D53.5/100
Duplication81
2.5% in rust, bash, python, c, typescript, c-header, docker, makefileDead coden/a
the languages dead code reads are under 5% of the codeComplexity35
75.9% 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 · 3,331 of 153,045 lines
322clones in code
243code files of 440 scanned
2.69%duplicated over all files · 479 clones
Most complex files
- robotd/src/main.rs988 cx
- robotctl/src/main.rs955 cx
- duck-ipc-proto/src/lib.rs497 cx
- robotctl/src/monitor.rs467 cx
- updater/src/engine.rs441 cx
- duckctl/src/main.rs388 cx
- robotd-params/src/lib.rs375 cx
- mediad/src/pipeline.rs267 cx
- mediad/src/relay.rs262 cx
- robotctl/src/endurance.rs237 cx
Dead code 0.32% unused · 4 findings
- spaces/vision-demo/filters.py:uprightunused-export
- spaces/shared/control.py:asynciounused-import
- spaces/vision-demo/app.py:npunused-import
- spaces/vision-demo/filters.py:MOUNT_ROTATION_DEGREESunused-export
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 1 generated file: odometry/src/anchors.rs.
Largest clones in the code
- 15 lines in 7 placesrust100 tokensrobotd/src/main.rs:8292–8306robotd/src/main.rs:8362–8376robotd/src/main.rs:8391–8405robotd/src/main.rs:8464–8478robotd/src/main.rs:8522–8536and 2 more
8292fn an_unknown_slot_is_refused_with_the_names() { 8293 let s = RobotState::new( 8294 &Params::default(), 8295 std::path::Path::new("/test/robotd.toml"), 8296 false, 8297 false, 8298 ); 8299 let intents = Arc::new(Intents::new()); 8300 8301 let result: proto::IntentResult = dispatch(First 10 of 15 lines.
- 17 lines in 3 placesrust147 tokens
9340let s = Arc::new(RobotState::new( 9341 ¶ms, 9342 std::path::Path::new("/test/robotd.toml"), 9343 false, 9344 false, 9345)); 9346let intents = Arc::new(Intents::new()); 9347intents.request_init(); 9348 9349let (tx, rx) = std::sync::mpsc::channel();First 10 of 17 lines.
- 43 lines in 2 placesbash231 tokens
25 echo "no OAUTH_CLIENT_ID in the environment; the page will not be able to sign anybody in" >&2 26fi 27 28mkdir -p /srv 29 30# Python rather than `sed`, because the value being substituted is now JSON: a provider URL is 31# full of the characters a `sed` replacement treats as syntax, and one of them silently produces 32# a page that parses and signs nobody in. 33python3 - /app/index.html /srv/index.html <<'PY' 34import jsonFirst 10 of 43 lines.
7 more
- 15 lines in 4 placesrust76 tokens
- 21 lines in 2 placesrust217 tokens
- 24 lines in 2 placesrust202 tokens
- 8 lines in 2 placesrust190 tokens
- 6 lines in 2 placesc187 tokens
- 22 lines in 2 placesrust186 tokens
- 25 lines in 2 placesrust185 tokens
Largest clones over all files, tests and data included
- 68 lines in 2 placesrustdocs and examples952 tokens
1256 assert_eq!(r.on_datagram(t, addr(A), &pkt(u32::MAX, Buttons::NONE, 0.0)), Accept::Stale); 1257} 1258 1259/// A press and a release that both land between two sends still make a tap. 1260#[test] 1261fn a_press_and_release_inside_one_interval_are_both_seen() { 1262 let (mut r, t) = (rx(), Instant::now()); 1263 r.on_datagram(t, addr(A), &pkt(1, Buttons::NONE, 0.0)); 1264 tick(r.poll(t)); 1265 r.on_datagram(ms(t, 5), addr(A), &pkt(2, Buttons::START, 0.0));First 10 of 68 lines.
- 60 lines in 2 placesrustdocs and examples794 tokens
1198 Packet::from_axes(seq, 0, [lx, 0.0, 0.0, 0.0], [0.0, 0.0], buttons).encode() 1199} 1200fn ms(t0: Instant, n: u64) -> Instant { 1201 t0 + Duration::from_millis(n) 1202} 1203fn tick(step: Step) -> PadFrame { 1204 match step { 1205 Step::Tick(f) => f, 1206 other => panic!("expected a tick, got {other:?}"), 1207 }First 10 of 60 lines.
- 15 lines in 7 placesrust100 tokensrobotd/src/main.rs:8292–8306robotd/src/main.rs:8362–8376robotd/src/main.rs:8391–8405robotd/src/main.rs:8464–8478robotd/src/main.rs:8522–8536and 2 more
8292fn an_unknown_slot_is_refused_with_the_names() { 8293 let s = RobotState::new( 8294 &Params::default(), 8295 std::path::Path::new("/test/robotd.toml"), 8296 false, 8297 false, 8298 ); 8299 let intents = Arc::new(Intents::new()); 8300 8301 let result: proto::IntentResult = dispatch(First 10 of 15 lines.
- 63 lines in 2 placesrustdocs and examples524 tokens
- 8 lines in 9 placesrusttests55 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 190 | 133,229 | 319 | 3,265 | 2.45% |
| bash | 30 | 12,309 | 2 | 60 | 0.49% |
| c | 3 | 2,039 | 1 | 6 | 0.29% |
| python | 15 | 3,580 | 0 | 0 | 0% |
| typescript | 4 | 1,587 | 0 | 0 | 0% |
| c-header | 1 | 301 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 219 | 143,931 | 466 | 5,077 | 3.53% |
| yaml | 10 | 1,928 | 7 | 183 | 9.49% |
| toml | 30 | 2,367 | 3 | 29 | 1.23% |
| bash | 46 | 12,643 | 2 | 60 | 0.47% |
| c | 3 | 2,039 | 1 | 6 | 0.29% |
| markdown | 51 | 20,018 | 0 | 0 | 0% |
| json | 6 | 6,373 | 0 | 0 | 0% |
| python | 18 | 3,738 | 0 | 0 | 0% |
| markup | 15 | 2,651 | 0 | 0 | 0% |
| typescript | 4 | 1,587 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 27, 2026 | #5 | 12,517 (+843) | 440 | 198,731 | 479 | 2.69% | 2.18% | D 53.5 | 96b89d8 |
| Oct 26, 2026 | #2 | 11,853 (+647) | 438 | 196,774 | 477 | 2.71% | 2.19% | D 53.6 | 942e58e |
| Oct 25, 2026 | #5 | 11,108 (+319) | 438 | 196,774 | 477 | 2.71% | 2.19% | D 53.6 | 942e58e |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.