Skip to content

editorconfig-checker Excludes Python Caches but Not .NET Build Output, So the Documented Local Lint Fails After a Build #1185

Closed

Description

@ptr727

Summary

.editorconfig-checker.json excludes five Python cache directories and no build output. scripts/docker_lint.py mounts the whole tree, so on any .NET fleet repo the documented local lint path fails with false errors as soon as the repo has been built, which is the normal state of a checkout an agent is working in.

Found while running RESYNC.md against ptr727/LanguageTags, audit run 2026-09-02T00:53:04Z | hub a9afa1d.

Reproduction

In any fleet repo whose Directory.Build.props sets an artifacts path, from a clean checkout:

$ dotnet build
$ python3 <hub>/scripts/docker_lint.py --root "$PWD"
START lint editorconfig-checker (124 file(s)) (timeout 300s)
.artifacts/bin/<Project>/debug/<Project>.pdb:
	Not all lines have the correct end of line character
[... 13 more, all under .artifacts/ ...]

14 errors found
FAILED lint editorconfig-checker (124 file(s)) (exit 1)
RESULT failed: container failure (exit 1)

Every reported path is a .pdb, an MSBuild .cache, or a generated .cs under .artifacts/. All of them are gitignored, and git status agrees the tree is clean:

$ git check-ignore -v .artifacts
.gitignore:8:.artifacts	.artifacts
$ git status --porcelain --untracked-files=all | grep -c artifacts
0

Why it is a real gap rather than a local nuisance

GOVERNANCE.md "Running the Linters Locally (Known-Working Invocations)" names docker_lint.py as the known-working headless path, and CODESTYLE.md requires the whole lint gate to pass before a push. So the documented pre-push command fails, for reasons unrelated to the change under review, on every .NET repo that has been built. CI never sees it because the lint job does not build, which is exactly why it has gone unnoticed.

The asymmetry is the tell: the exclude list already carries __pycache__, .mypy_cache, .pytest_cache, .ruff_cache, and .venv, which is the same class of generated, gitignored output for the other language. The .NET equivalents were never added.

Expected

One of:

  1. .editorconfig-checker.json gains the .NET build-output excludes, (^|/)\.artifacts/, (^|/)bin/, (^|/)obj/, alongside the Python cache entries it already has. Smallest change, and it matches the file's existing shape.
  2. docker_lint.py derives editorconfig-checker's target list from git ls-files the way it already does for the file-argument linters, rather than letting the tool walk the mounted tree. Fixes the class rather than the instance, and would also cover a repo whose generated output the exclude list has not anticipated.

The file is intent, whole: true, so a downstream repo could technically add its own excludes, but every .NET repo in the fleet would then add the same three lines independently, which is the drift the shared config exists to prevent.

Activity

  1. added
    script
    on Sep 5, 2026
  2. added a commit that references this issue on Oct 9, 2026
    eef6e5d
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

    script

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions