Skip to content

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

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

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions