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.rb587 cx
- app/models/provider/trade_republic_client.rb566 cx
- app/models/simplefin_item/importer.rb473 cx
- app/models/trade_republic_account/activities_processor.rb441 cx
- app/models/goal.rb434 cx
- app/models/user.rb426 cx
- app/controllers/sophtron_items_controller.rb420 cx
- app/models/enable_banking_item/importer.rb348 cx
- app/models/account/provider_import_adapter.rb342 cx
Dead code 74.64% 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/donut_chart_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/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: 'api-user@example.com', 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 placesrubytests126 tokenstest/models/kraken_item/importer_test.rb:212–222test/models/kraken_item/importer_test.rb:237–247test/models/kraken_item/importer_test.rb:264–274test/models/kraken_item/importer_test.rb:295–305test/models/kraken_item/importer_test.rb:323–333and 5 more
212@provider.stubs(:get_asset_info).returns(asset_metadata) 213@provider.stubs(:get_extended_balance).returns( 214 "ZUSD" => { "balance" => "50.0", "credit" => "0", "credit_used" => "0", "hold_trade" => "0" } 215) 216@provider.stubs(:get_earn_allocations).returns( 217 "items" => [ 218 { "native_asset" => "XXBT", "amount_allocated" => { "total" => { "native" => "2.0" } } } 219 ] 220) 221@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,704 | 229,283 | 476 | 6,736 | 2.94% |
| dart | 108 | 29,574 | 54 | 646 | 2.18% |
| javascript | 155 | 19,879 | 35 | 946 | 4.76% |
| 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,996 | 529,296 | 1,876 | 23,335 | 4.41% |
| erb | 820 | 49,796 | 670 | 7,034 | 14.13% |
| yaml | 2,299 | 244,297 | 623 | 17,000 | 6.96% |
| dart | 154 | 36,710 | 70 | 872 | 2.38% |
| javascript | 168 | 21,968 | 36 | 980 | 4.46% |
| markup | 41 | 1,295 | 30 | 415 | 32.05% |
| markdown | 72 | 16,650 | 10 | 94 | 0.56% |
| json | 19 | 2,125 | 2 | 42 | 1.98% |
| bash | 17 | 1,848 | 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 15, 2026 | #8 | 15,404 (+659) | 6,657 | 909,600 | 3,319 | 5.47% | 2.95% | C 66.5 | dbeebf1 |
| Nov 14, 2026 | #4 | 14,860 (+925) | 6,593 | 899,033 | 3,275 | 5.5% | 2.97% | C 66.5 | c6f7170 |
| Nov 13, 2026 | #5 | 14,097 (+967) | 6,592 | 898,493 | 3,274 | 5.5% | 2.97% | C 66.5 | 6ffd789 |
| Nov 12, 2026 | #5 | 13,123 (+1,078) | 6,560 | 890,969 | 3,255 | 5.52% | 3% | C 66.6 | a9aeefa |
| 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.