Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a tidy rule forbidding modules named build #133404

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Nov 24, 2024

  1. Remove a stray backtick

    This was not detected by `x test tidy`, presumably because it's inside a
    directory named "build". Fix it now, because later changes in this PR will
    cause it to be detected.
    Zalathar committed Nov 24, 2024
    Configuration menu
    Copy the full SHA
    11fe251 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a6444ca View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7ee19f8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ccc06c0 View commit details
    Browse the repository at this point in the history
  5. Add a tidy check prohibiting mod build

    Because we have a .gitignore rule for `build/`, having a module directory named
    "build" causes various problems for tools that try to skip ignored files.
    
    Forbidding this in tidy is trickier than it looks, because tidy itself tries to
    skip ignored files. So the rule instead looks in non-ignored files for module
    declarations that would imply the existence of potentially-ignored module
    directories.
    
    This also has the side-effect of prohibiting `build.rs` files that aren't build
    scripts.
    Zalathar committed Nov 24, 2024
    Configuration menu
    Copy the full SHA
    508e78f View commit details
    Browse the repository at this point in the history