Skip to content

Normalize Windows path separators in get_maintainer.py #596

Closed

Description

@LunaStev

tools/get_maintainer.py matches input files with:

file.startswith(path)

The F: entries in MAINTAINERS use repository-style / separators, for example:

  • front/lexer/
  • front/parser/
  • tests/cases/

A native Windows path such as front\\parser\\ast.rs therefore does not start with front/parser/, and the script falls back to the default maintainer even though the file belongs to a specific section.

Code evidence:

  • tools/get_maintainer.py
  • MAINTAINERS

Acceptance:

  • Normalize input file paths to repository-style separators before matching.
  • Keep existing / paths working on Unix-like hosts.
  • Cover both front/parser/file.rs and front\\parser\\file.rs.
  • Do not allow normalization to introduce false prefix matches between sibling directories.
  • Add focused Python tests for path matching.

Activity

  1. added
    bug
    good first issue
    cross-platform
    on Sep 12, 2026
  2. nightcityblade commented on Sep 12, 2026

    @nightcityblade
    Contributor

    Hi, I'd like to work on this. I'll submit a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcross-platformgood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions