Fix operations
Every fix: block uses one of these ops. See ARCHITECTURE.md for the full cross-reference of which op pairs with which rule kind.
Path-only (ignore fix_size_limit):
file_create: {content, path?, create_parents?}file_remove: {}file_rename: {}(target derived from rule config)dir_create: {}relocate: {}(moves the file to the repo root)chmod: {}(direction from the rule)git_untrack: {}(git rm --cached; spawning)command: {run, timeout?}(runs a user command; spawning)
Content-editing (skipped on files over fix_size_limit; default 1 MiB, null disables the cap):
file_prepend: {content}file_append: {content}file_trim_trailing_whitespace: {}file_append_final_newline: {}file_normalize_line_endings: {}(target read from parent rule)file_strip_bidi: {}file_strip_zero_width: {}file_strip_bom: {}file_collapse_blank_lines: {}(max read from parent rule)replace: {replacement}(pattern from parent rule) — located, one splice per matchset_value: {}(value from the rule'sequals:) — for the*_path_equalskindsremove_value: {}(target from parent rule) — for the*_path_absentkindssync_from: {}(source + relation from parent rule) — forcross_filecreate_and_register: {content?, content_from?}— forcross_filerelation: registeredsort: {}(markers / comparator /unique/selectfrom parent rule) — forordered_blockindent_style: {}(style / width from parent rule) — forindent_style(style: spaces+widthonly)insert_line: {}(require lines / comparator from parent rule) — for a markerlessordered_blockwithrequire:insert_header: {content?, content_from?}— forfile_header; inserts AFTER a leading BOM / shebang /<?xml?>(position-awarefile_prepend)
fix_size_limit is a top-level config field:
version: 1fix_size_limit: 1048576 # 1 MiB — the default; `null` disablesrules: - ...Over-limit files report Skipped with a stderr warning rather than applying the fix.