![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Functions | |
| subsystem (path) | |
| sources () | |
| build_index () | |
| main () | |
Variables | |
| str | SRC = 'src' |
| dict | LAYER |
| dict | NEVER_MOVE |
Find files that live in the wrong directory.
A file whose only consumers are in ONE other subsystem is not shared infrastructure --
it belongs to that subsystem. This reports those, and refuses to report the ones that
would merely move the problem.
Two checks make the difference between a useful list and a misleading one:
* SIBLING USE. A header used by `iop/` looks like an `iop/` file until you notice that
three files in its own directory also use it. Moving it alone then creates a new
layering inversion where there was none. Such files are reported separately as
"cluster" candidates: they can only move together with the siblings that use them.
* LAYER DIRECTION. Moving a file UP the layer stack (common/ -> iop/) removes an
inversion. Moving it DOWN would create one. Only the former is proposed.
Usage:
python3 tools/misplaced_files.py # every source directory
python3 tools/misplaced_files.py --dir common # one directory
python3 tools/misplaced_files.py --clusters # show the blocked ones and why
| misplaced_files.build_index | ( | ) |
| misplaced_files.main | ( | void | ) |
Definition at line 75 of file misplaced_files.py.
References build_index(), main(), and subsystem().
Referenced by main().
| misplaced_files.sources | ( | ) |
Definition at line 44 of file misplaced_files.py.
Referenced by build_index().
| misplaced_files.subsystem | ( | path | ) |
Definition at line 39 of file misplaced_files.py.
Referenced by main().
| dict misplaced_files.LAYER |
Definition at line 29 of file misplaced_files.py.
| dict misplaced_files.NEVER_MOVE |
Definition at line 35 of file misplaced_files.py.
| str misplaced_files.SRC = 'src' |
Definition at line 28 of file misplaced_files.py.