pollen-robotics/microduck
A Tiny biped duck robot 🦆
Rust★ 11,108+319 that day#5 on trending
D53.6/100
Duplication81
2.6% in rust, bash, python, c, typescript, c-header, docker, makefileDead coden/a
the languages dead code reads are under 5% of the codeComplexity35
75.7% 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.19%duplicated code · 3,318 of 151,166 lines
320clones in code
241code files of 438 scanned
2.71%duplicated over all files · 477 clones
Most complex files
- robotd/src/main.rs988 cx
- robotctl/src/main.rs954 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
- xtask/src/main.rs236 cx
Dead code 0.35% 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:8295–8309robotd/src/main.rs:8365–8379robotd/src/main.rs:8394–8408robotd/src/main.rs:8467–8481robotd/src/main.rs:8525–8539and 2 more
8295fn an_unknown_slot_is_refused_with_the_names() { 8296 let s = RobotState::new( 8297 &Params::default(), 8298 std::path::Path::new("/test/robotd.toml"), 8299 false, 8300 false, 8301 ); 8302 let intents = Arc::new(Intents::new()); 8303 8304 let result: proto::IntentResult = dispatch(First 10 of 15 lines.
- 17 lines in 3 placesrust147 tokens
9343let s = Arc::new(RobotState::new( 9344 ¶ms, 9345 std::path::Path::new("/test/robotd.toml"), 9346 false, 9347 false, 9348)); 9349let intents = Arc::new(Intents::new()); 9350intents.request_init(); 9351 9352let (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:8295–8309robotd/src/main.rs:8365–8379robotd/src/main.rs:8394–8408robotd/src/main.rs:8467–8481robotd/src/main.rs:8525–8539and 2 more
8295fn an_unknown_slot_is_refused_with_the_names() { 8296 let s = RobotState::new( 8297 &Params::default(), 8298 std::path::Path::new("/test/robotd.toml"), 8299 false, 8300 false, 8301 ); 8302 let intents = Arc::new(Intents::new()); 8303 8304 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 | 189 | 131,762 | 317 | 3,252 | 2.47% |
| bash | 30 | 12,309 | 2 | 60 | 0.49% |
| c | 3 | 2,039 | 1 | 6 | 0.29% |
| python | 14 | 3,168 | 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 | 218 | 142,464 | 464 | 5,064 | 3.55% |
| 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 | 19,985 | 0 | 0 | 0% |
| json | 6 | 6,373 | 0 | 0 | 0% |
| python | 17 | 3,326 | 0 | 0 | 0% |
| markup | 15 | 2,610 | 0 | 0 | 0% |
| typescript | 4 | 1,587 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| 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.