Skip to content

GitHub: File validation interacts badly with PRs adding submodules #396

Description

Our automation to "validate" files for whitespace, line endings, and non-ASCII characters doesn't handle submodule additions very well. We have a hardcoded list of directories to skip when validating:

static constexpr array skipped_directories{
".git"sv,
".vs"sv,
".vscode"sv,
"llvm-project"sv,
"out"sv,
"vcpkg"sv,
};

Here's the problem scenario:

  1. A PR adds a cat submodule, and updates validate.cpp to skip that directory.
  2. The VMs properly init that submodule, and skip it while validating.
  3. At this point, the cat PR hasn't been merged yet!
  4. A totally separate PR (modifying mouse machinery or whatever) triggers checks on those VMs.
  5. The VMs don't clean out the cat directory, and the mouse PR doesn't contain validate.cpp changes to skip cat, so all of the cat files are scanned and fail to validate.

I suspect that this is involved:

- checkout: self
submodules: recursive

According to the YAML schema, do we need to set clean: true so we don't have to worry about lingering submodules?

Activity

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

    fixedSomething works now, yay!infrastructureRelated to repository automation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions