we-promise/sure
The personal finance app for everyone (by everyone)
The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
Most complex files
- app/models/wise_item/importer.rb866 cx
- app/models/family/data_importer.rb578 cx
- app/models/provider/trade_republic_client.rb544 cx
- app/models/simplefin_item/importer.rb473 cx
- app/models/goal.rb434 cx
- app/models/trade_republic_account/activities_processor.rb424 cx
- app/controllers/sophtron_items_controller.rb420 cx
- app/models/user.rb398 cx
- app/models/enable_banking_item/importer.rb348 cx
- app/models/account/provider_import_adapter.rb342 cx
Dead code 74.58% unused · 140 findings
- app/javascript/controllers/preview_sankey_chart_controller.jsunused-file
- app/javascript/controllers/sankey_chart_controller.jsunused-file
- app/javascript/controllers/goal_projection_chart_controller.jsunused-file
- app/javascript/controllers/loan_payoff_chart_controller.jsunused-file
- app/javascript/controllers/tag_select_controller.jsunused-file
- app/javascript/controllers/select_controller.jsunused-file
- app/javascript/controllers/merchant_select_controller.jsunused-file
- app/javascript/controllers/category_select_controller.jsunused-file
- app/javascript/controllers/donut_chart_controller.jsunused-file
- app/javascript/controllers/spending_chart_controller.jsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 9 generated files: app/models/transaction/grouper/by_merchant_or_name.rb, bin/tokens.mjs, db/migrate/20251102143510_remove_duplicate_account_providers_index.rb, db/schema.rb, mobile/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java, mobile/ios/Runner/GeneratedPluginRegistrant.h, mobile/ios/Runner/GeneratedPluginRegistrant.m, mobile/lib/theme/sure_tokens.dart, spec/spec_helper.rb.
Largest clones in the code
- 255 lines in 2 placesjavascript1,493 tokensapp/javascript/controllers/preview_sankey_chart_controller.js:364–618app/javascript/controllers/sankey_chart_controller.js:303–557
364 return `${this.gradientPrefix}-link-gradient-${link.source.index}-${link.target.index}-${index}`; 365} 366 367#colorWithOpacity(nodeColor, opacity = 0.1) { 368 const defaultColor = this.constructor.DEFAULT_COLOR; 369 let colorStr = nodeColor || defaultColor; 370 371 // Map CSS variables to hex values for d3 color manipulation 372 colorStr = this.constructor.CSS_VAR_MAP[colorStr] || colorStr; 373First 10 of 255 lines.
- 58 lines in 3 placesruby355 tokensapp/models/fio_item/syncer.rb:89–146app/models/monobank_item/syncer.rb:84–141app/models/up_item/syncer.rb:84–141
89def perform_post_sync 90 # no-op 91end 92 93private 94 95 # Raise a SyncError if a single result hash indicates failure. 96 def raise_if_failed_result!(result, stage:) 97 return unless failed_result?(result) 98First 10 of 58 lines.
- 13 lines in 13 placesruby55 tokensapp/models/binance_item/unlinking.rb:10–22app/models/coinbase_item/unlinking.rb:15–27app/models/coinstats_item/unlinking.rb:16–28app/models/fio_item/unlinking.rb:15–27app/models/ibkr_item/unlinking.rb:10–22and 8 more
10links = AccountProvider.where(provider_type: BinanceAccount.name, provider_id: provider_account.id).to_a 11link_ids = links.map(&:id) 12result = { 13 provider_account_id: provider_account.id, 14 name: provider_account.name, 15 provider_link_ids: link_ids 16} 17results << result 18 19next if dry_runFirst 10 of 13 lines.
7 more
- 25 lines in 6 placesruby96 tokens
- 77 lines in 2 placesjavascript477 tokens
- 6 lines in 9 placesruby59 tokens
- 25 lines in 5 placesruby108 tokensdb/migrate/20251126094446_create_enable_banking_items_and_accounts.rb:4–28db/migrate/20251221060111_create_coinstats_items_and_accounts.rb:4–28db/migrate/20260109220800_create_sophtron_items_and_accounts.rb:4–28db/migrate/20260121101345_create_mercury_items_and_accounts.rb:4–28db/migrate/20260205110328_create_indexa_capital_items_and_accounts.rb:6–30
- 40 lines in 3 placesruby211 tokens
- 25 lines in 7 placesruby63 tokens
- 13 lines in 7 placesruby57 tokens
Largest clones over all files, tests and data included
- 255 lines in 2 placesjavascript1,493 tokensapp/javascript/controllers/preview_sankey_chart_controller.js:364–618app/javascript/controllers/sankey_chart_controller.js:303–557
364 return `${this.gradientPrefix}-link-gradient-${link.source.index}-${link.target.index}-${index}`; 365} 366 367#colorWithOpacity(nodeColor, opacity = 0.1) { 368 const defaultColor = this.constructor.DEFAULT_COLOR; 369 let colorStr = nodeColor || defaultColor; 370 371 // Map CSS variables to hex values for d3 color manipulation 372 colorStr = this.constructor.CSS_VAR_MAP[colorStr] || colorStr; 373First 10 of 255 lines.
- 9 lines in 25 placesrubytests58 tokensspec/requests/api/v1/account_statements_spec.rb:5–13spec/requests/api/v1/accounts_spec.rb:5–19spec/requests/api/v1/balance_sheet_spec.rb:5–19spec/requests/api/v1/balances_spec.rb:5–19spec/requests/api/v1/budget_categories_spec.rb:5–19and 20 more
5RSpec.describe 'API V1 Account Statements', type: :request do 6 let(:family) do 7 Family.create!(name: 'API Family', currency: 'USD', locale: 'en', date_format: '%m-%d-%Y') 8 end 9 let(:user) do 10 family.users.create!( 11 email: '[email protected]', 12 password: 'password123', 13 password_confirmation: 'password123',5RSpec.describe 'API V1 Accounts', type: :request do 6 let(:family) do 7 Family.create!( 8 name: 'API Family', 9 currency: 'USD', 10 locale: 'en', 11 date_format: '%m-%d-%Y' 12 ) 13 end 14 - 11 lines in 10 placesrubytests132 tokenstest/models/kraken_item/importer_test.rb:128–138test/models/kraken_item/importer_test.rb:153–163test/models/kraken_item/importer_test.rb:180–190test/models/kraken_item/importer_test.rb:211–221test/models/kraken_item/importer_test.rb:239–249and 5 more
128@provider.stubs(:get_asset_info).returns(asset_metadata) 129@provider.stubs(:get_extended_balance).returns( 130 "ZUSD" => { "balance" => "50.0", "credit" => "0", "credit_used" => "0", "hold_trade" => "0" } 131) 132@provider.stubs(:get_earn_allocations).returns( 133 "items" => [ 134 { "native_asset" => "XXBT", "amount_allocated" => { "total" => { "native" => "2.0" } } } 135 ] 136) 137@provider.stubs(:get_ticker).with("XBTUSD").returns("XXBTZUSD" => { "c" => [ "50000.00" ] })First 10 of 11 lines.
- 133 lines in 3 placesyamltranslations524 tokens
- 29 lines in 12 placesrubytests95 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| ruby | 1,669 | 224,053 | 478 | 6,763 | 3.02% |
| dart | 108 | 29,574 | 54 | 646 | 2.18% |
| javascript | 155 | 19,768 | 35 | 946 | 4.79% |
| rust | 12 | 1,364 | 0 | 0 | 0% |
| bash | 5 | 1,243 | 0 | 0 | 0% |
| typescript | 5 | 369 | 0 | 0 | 0% |
| groovy | 2 | 127 | 0 | 0 | 0% |
| swift | 1 | 13 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| ruby | 2,927 | 513,214 | 1,823 | 22,894 | 4.46% |
| erb | 815 | 49,190 | 662 | 6,967 | 14.16% |
| yaml | 2,268 | 239,639 | 620 | 16,941 | 7.07% |
| dart | 154 | 36,710 | 70 | 872 | 2.38% |
| javascript | 168 | 21,843 | 36 | 980 | 4.49% |
| markup | 41 | 1,294 | 30 | 415 | 32.07% |
| markdown | 70 | 16,178 | 9 | 87 | 0.54% |
| json | 19 | 2,125 | 2 | 42 | 1.98% |
| bash | 17 | 1,832 | 1 | 2 | 0.11% |
| css | 12 | 1,827 | 1 | 9 | 0.49% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 11, 2026 | #5 | 12,170 (+159) | 6,549 | 887,618 | 3,254 | 5.54% | 3.02% | C 66.5 | 264bbf7 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.