镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

dotnet build leaves .editorconfig and .gitignore modified on every clone, because #164 reverted both to an older SDK template #170

Closed

Description

@matt-edmondson

What's wrong

Commit 1b2f521 ("Canonicalize key aliases and remove unrelated metadata edits", merged in #164) treated the SDK-managed .editorconfig and .gitignore as unrelated edits and reverted them to an older template:

  • .editorconfig ~L22: file_header_template went from Copyright (c) 2023-2026 ktsu-dev contributors back to Copyright (c) ktsu.dev\nAll rights reserved.\nLicensed under the MIT license.. Every .cs file in the repo still has the 2023-2026 ktsu-dev contributors header, so the committed template and the code disagree.
  • .editorconfig ~L385: the C++ section header went from [*.{cpp,h,hpp,cc,hh,cxx,hxx}] back to [*.cpp,*.h,*.hpp,*.cc,*.hh,*.cxx,*.hxx]. EditorConfig doesn't support a comma list without braces, so that section matches nothing.
  • .gitignore: 18 lines were removed. These include the !**/[Pp]ackages/manifest.json and !**/[Pp]ackages/packages-lock.json negations, the .godot/ rule, and the !**/[Aa]ssets/**/*.meta negation.

The SDK pinned in global.json (ktsu.Sdk 2.31.2) writes the newer version of both files during build.

Reproduce

git clone https://github.com/ktsu-dev/Keybinding && cd Keybinding
dotnet build Keybinding/Keybinding.csproj
git status --short
#  M .editorconfig
#  M .gitignore

git diff shows the build putting back exactly what 1b2f521 removed.

Why it matters

Every contributor, and every automation that expects a clean tree after building, gets an unrelated two-file diff. Anyone who commits with git add -A re-applies the change by accident, and the next "remove unrelated edits" pass reverts it again. That is how this ended up bouncing across PRs.

Suggested fix / acceptance criteria

  • Revert the .editorconfig and .gitignore hunks of 1b2f521, so the committed files match what ktsu.Sdk 2.31.2 generates.
  • A fresh clone followed by dotnet build leaves git status clean.

Activity

  1. matt-edmondson commented on Oct 6, 2026

    @matt-edmondson
    ContributorAuthor

    Triage

    • Category: Bug
    • Priority: Medium. Every build leaves a dirty tree, which disrupts contributors and automation and keeps the change bouncing between PRs. The library itself is unaffected, and the fix is a partial revert of 1b2f521.
    • Area / suggested owner: Repo metadata / SDK-managed files (.editorconfig, .gitignore).
    • Duplicates / in progress: Not a duplicate. The only open PR (Bump the ktsu group with 1 update #165) is a dependency bump and does not touch these files.

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions