lucaronin
31232db22f
refactor: flatten extract_snippet and purge_trash complexity
Extract helper functions to reduce cyclomatic complexity and nesting:
extract_snippet (cc=10 → ~3):
- strip_frontmatter(): removes YAML frontmatter
- is_snippet_line(): filters useful content lines
- truncate_with_ellipsis(): UTF-8-safe string truncation
purge_trash (cc=14, nesting=5 → cc~4, nesting=2):
- extract_trashed_at_string(): extracts date from gray_matter Pod
- parse_trashed_date(): parses ISO date string to NaiveDate
- is_markdown_file(): checks file extension
- try_purge_file(): handles deletion + logging
Code health: 7.29 → 8.54. Remaining issues: Low Cohesion, String Heavy Args.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:37:31 +01:00
..
2026-02-23 21:01:42 +01:00
2026-02-21 10:21:30 +01:00
2026-02-23 22:37:31 +01:00
2026-02-14 18:20:07 +01:00
2026-02-23 10:50:36 +00:00
2026-02-23 21:01:42 +01:00
2026-02-23 21:01:42 +01:00
2026-02-23 13:36:09 +01:00