Skip to content

Decide Whether the File-Naming Check Judges Executable Dotfiles and Dotted Names #3268

Closed

Description

@ptr727

The question

The file-naming check in spec/audit.py (file_naming_findings, added by #3253) takes everything after a name's last dot as its extension. It judges only executables with no extension. So two kinds of executable are skipped silently, with no shebang read and nothing reported as undecided:

  • an executable dotfile, such as bin/.Hidden_Hook (mode 100755, #!/bin/sh), whose text after the leading dot is read as an extension
  • an executable whose name carries a dot that is not a language extension, such as bin/Run_Me.v2 (mode 100755, #!/bin/sh)

AUDIT.md, the filenaming.scripts assert in spec/project-types.json, and the function's docstring do not define an extension, and they do not say whether either kind is in scope. Python's own os.path.splitext calls a dotfile extensionless. A name opening on a dot can never match HYPHENATED_FILE_STEM, though, so bringing dotfiles into scope as they stand would report every executable dotfile as broken.

Copilot's round on promotion #3266 pointed near this, saying an extensionless executable can be skipped before undecidable files are reported. That ordering claim does not hold: every extensionless executable that breaks the pattern ends up either broken or undecided. These two kinds are the gap that is left.

Choices

  1. Leave both out of scope, and say so (recommended). State in AUDIT.md and the assert that a dotfile and a name with any dot are not judged by the scripts rule. The check's reach stays where it is, the gap becomes a documented boundary, and no repository's tree changes.
  2. Report both as undecided. Each is read the way an extensionless executable is. This surfaces them for a human without failing anything. It adds report rows on any repository carrying an executable dotfile, such as a hook.
  3. Bring dotted names into scope and leave dotfiles out. Only the text after a dot that names a known language counts as an extension, so Run_Me.v2 is judged on its stem. Dotfiles are named out of scope as in choice 1.

Activity

  1. added
    enhancement
    decision
    on Oct 20, 2026
  2. ptr727 commented on Oct 20, 2026

    @ptr727
    OwnerAuthor

    The maintainer answered on 2026-10-20: choice 1, out of scope and documented. State in AUDIT.md and the filenaming.scripts assert that an executable dotfile and a name with any dot are not judged by the scripts rule. The check's reach stays as it is. The issue stays open for that change.

  3. removed
    decision
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions