Skip to content

Reject Rocq commands without locality specifiers #48

@pgiarrusso-sl

Description

@pgiarrusso-sl

Commands like Open Scope, Hint Resolve, Arguments etc should always come with locality specifiers.

Relying on defaults is error-prone and often causes bugs.

  • the defaults are sometimes broken — they're hard to remember
  • even when the defaults are sensible, they're often not what reviewers expect. We almost always want #[global] or #[export],
    but Rocq often chooses #[local], which effectively means the attribute is silently ignored.
  • the inferred locality depends on whether we're in a section/module or not, which is often not apparent locally. (Usually the code is indented iff we're not at the top-level, but that's not reliable either).

Note: This is probably not actionable in isolation, but I'd want this to be part of a code linter that runs in CI. We had something at BlueRock. In addition, linting might be also useful for users or to train agents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions