Skip to content

Releases: mit-d/check-unicode

v0.6.0

29 Mar 19:40

Choose a tag to compare

Added

  • Pipe mode: check-unicode - reads stdin line-by-line and writes to stdout,
    enabling use as a streaming Unix filter for log monitoring, CI pipelines, and
    editor buffer filtering
  • --strip [dangerous|all] flag to remove non-ASCII characters; dangerous
    strips only invisible/bidi chars, all (default) strips any remaining
    non-ASCII after allow-list processing
  • --halt [dangerous|all] flag to stop immediately on first matching character;
    dangerous (default) halts on invisible/bidi chars, all halts on any
    non-ASCII
  • --fix, --strip, and --halt are fully composable and work identically
    across file and pipe modes

Changed

  • En dash and em dash now replace to - instead of --
  • Expanded --fix replacement table with: hyphen variants (U+2010-2012, U+2015,
    U+FE58), soft hyphen (removed), bullets, dot leaders, arrows (->, <-, ^,
    v), and math operators (x, /)
  • Add pytest-sugar for improved test output
  • Replace mypy with ty for type checking
  • Move dev dependencies from optional-dependencies to dependency-groups
  • Switch CI from pip to uv for faster, reproducible installs; check in uv.lock
  • Extract codepoint/range parsing into check_unicode.parsing module for reuse
  • Codepoint parser now validates the Unicode range (0..U+10FFFF) and rejects
    empty/invalid input with clear error messages
  • Range parser now rejects inverted ranges (lo > hi) and tolerates whitespace
    around the dash separator

v0.5.0

11 Mar 01:32

Choose a tag to compare

Fixed

  • Validate severity values from config files and overrides (invalid values
    like "warn" now exit 2 instead of silently behaving as warning)
  • Catch config file errors (missing file, invalid TOML) and exit 2 with a
    friendly message instead of a raw traceback
  • Validate --allow-category and --allow-script values; unknown names now
    exit 2 with a hint to use --list-categories or --list-scripts
  • Warn on unrecognised top-level config keys (e.g. typo alow-codepoints)
  • Remove dead U+FFFD entry from REPLACEMENT_TABLE (unreachable because
    U+FFFD is in DANGEROUS_INVISIBLE, which is checked first)
  • Exclude tests/fixtures/ from mypy (intentionally malformed Trojan Source
    files)

Added

  • Grouped output: findings are now grouped per file with a compact line range
    header (e.g. file.txt:1,4-80,90:), context lines shown once with multi-caret
    markers (^ normal, ! dangerous, ? confusable), deduplicated identical
    context lines, and collapsed codepoint listing with (xN) counts

Changed

  • Refactor _apply_replacements to use str.translate() for cleaner code and
    better performance on large files
  • Read each file once when --check-confusables is enabled (previously
    check_file and check_confusables each read the file independently)
  • Simplify _parse_codepoint to use prefix-stripping instead of fragile
    double-replace chain
  • Add slots=True to Override dataclass for consistency with Finding and
    AllowConfig

Docs

  • Document per-file [[tool.check-unicode.overrides]] in README and man page
  • Update man page version to 0.4.0 and fix stale pre-commit rev
  • Add man page to bump-my-version files list

v0.4.0

28 Feb 19:47

Choose a tag to compare

Added

  • [[tool.check-unicode.overrides]] per-file config: apply different
    allow-lists, severity, and confusable settings per file pattern
  • Per-file severity: override severity to "warning" for specific file
    patterns so findings don't affect exit code
  • Per-file confusable toggle: enable or disable check-confusables per file
    pattern
  • uv.lock added to .gitignore

v0.3.3

23 Feb 19:41

Choose a tag to compare

Fixed

  • --fix mode now fixes all files, not just the first (any() short-circuited
    after the first fixable file, skipping the rest)

v0.3.2

21 Feb 20:36

Choose a tag to compare

Added

  • CONTRIBUTING.md guide
  • SECURITY.md with private vulnerability reporting instructions
  • Issue templates for bug reports and feature requests
  • Make bump-my-version handle README.md version

v0.3.1

21 Feb 20:13

Choose a tag to compare

Added

  • PR template with changelog and testing checklist
  • Coverage threshold (80%) enforced in CI
  • markdownlint config: allow duplicate headings across sibling sections

v0.3.0

21 Feb 20:00

Choose a tag to compare

Added

  • Grouped CLI help with --help showing organized option sections
  • Usage examples in --help output
  • Man page (docs/check-unicode.1)
  • Release workflow for automatic GitHub Releases on tag push
  • bump-my-version config for version management