Skip to content

Make std binding policy checks recognize valid whitespace and multiline declarations #560

Closed

Description

@LunaStev

check_std_policy.sh searches for literal-adjacent forms such as extern(c and import("std::libc::. Valid spacing between these tokens (for example extern ( c, "name" ) or a spaced import) avoids the searches. The frontend parses tokens with whitespace skipping, so formatting can change whether the policy checker sees the same declaration.

The check should follow accepted source layouts without confusing commented-out text with an active binding.

Code evidence:

Acceptance:

  • Recognize the relevant declarations across accepted spaces/newlines/comments between tokens.
  • Add isolated fixtures for compact, spaced and multiline bindings/imports and for commented-out lookalikes.
  • Apply the existing allowed-provider rules consistently to equivalent source forms.
  • Do not solve the problem by restricting valid Wave formatting or adding a frontend parser dependency.

Audit status: static source inspection against canonical master ea74c2dafc31da876e5561f2d176ba719f5a0458 on 2026-09-10. No compiler build, test execution, implementation change or local reproduction was performed for this report. The examples describe the source-derived behavior to verify when implementing the fix.

Activity

  1. added
    bug
    help wanted
    on Sep 10, 2026
  2. self-assigned this
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bughelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions