Options
Detection
| Flag | Description |
|---|---|
--mode <MODE> | Detection mode: strict, mild (default), weak, semantic |
--min-tokens <N> | Minimum tokens per clone (default: 50) |
--min-lines <N> | Minimum lines per clone (default: 5) |
--skip-local | Only report cross-directory duplicates |
--cross-language | Strip TS types for TS to JS matching |
Output
| Flag | Description |
|---|---|
-f, --format <FORMAT> | Output format: human (default), json, sarif, compact |
--quiet | Suppress progress output |
--threshold <N> | Fail if duplication exceeds N% |
Incremental
| Flag | Description |
|---|---|
--baseline | Compare against saved baseline |
--save-baseline | Save current duplication as baseline |
Debugging
| Flag | Description |
|---|---|
--trace <FILE:LINE> | Show all clones of code at a specific location |
--performance | Show pipeline timing breakdown |
Detection modes
Detection mode details
Detection mode details
Each mode progressively normalizes more syntax before comparing, trading precision for recall.
As you move from
| Mode | What it normalizes | Best for |
|---|---|---|
| strict | Nothing: exact token match | Finding verbatim copies |
| mild | Whitespace, semicolons, trailing commas | General-purpose detection (default) |
| weak | + string literal values | Catching copies with different messages |
| semantic | + variable names and numeric values | Finding structural clones after renaming |
strict to semantic, you’ll find more clones but also more potential false positives. Start with mild and increase sensitivity as needed.Examples
Example output
$ fallow dupes --threshold 25
$ fallow dupes --threshold 15
See also
Duplication analysis
How fallow’s detection engine works.
Configuration
Set default modes and thresholds in your config.
Migrating from jscpd
Coming from jscpd? See the migration guide.