Tree shaking

Tree shaking for orders/approval/decision keeps 24 lines, deletes 60 and adds 1. It keeps 4 files and removes 2.
lib/money.rego: 4 lines kept, 9 deleted, 0 added
1package lib.money
2
3# True if the amount is not over the limit.
4within_limit(amount, limit) if amount <= limit
5
6# The amount with the tax of the region, in cents.
7with_tax(amount, region) := round((amount * (1 + data.orders.tax[region])) * 100)
8
9# The amount in cents.
10cents(amount) := round(amount * 100)
11
12# True if the company accepts the currency.
13accepted_currency(code) if code in {"EUR", "GBP", "USD"}

Counts

Lines kept24
Lines deleted60
Lines added1
Files kept4
Files removed2

Builtins (5)

  • count
  • equal
  • internal.member_2
  • lte
  • sprintf

Legend

1A kept line: the shaken bundle has it.
2A deleted line: the shaken bundle does not have it.
+An added line: only the shaken bundle has it.
  • policy.rego a removed file