Skip to content

chore: add .editorconfig for consistent code formatting#2366

Open
srpatcha wants to merge 1 commit intogithub:mainfrom
srpatcha:chore/add-editorconfig
Open

chore: add .editorconfig for consistent code formatting#2366
srpatcha wants to merge 1 commit intogithub:mainfrom
srpatcha:chore/add-editorconfig

Conversation

@srpatcha
Copy link
Copy Markdown

Changes

chore: add .editorconfig for consistent code formatting

Signed with GPG.

@srpatcha srpatcha requested a review from mnriem as a code owner April 25, 2026 02:43
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you are mixing two PRs?

@srpatcha
Copy link
Copy Markdown
Author

Hi @mnriem, you're right — this PR has grown beyond the initial .editorconfig scope. I'll split it into separate PRs:

  1. .editorconfig only (the original chore)
  2. Validation workflow step (the new feature)

I'll restructure and resubmit. Thank you for the feedback!

@srpatcha srpatcha force-pushed the chore/add-editorconfig branch from eaba366 to f6abe06 Compare May 5, 2026 01:39
@srpatcha
Copy link
Copy Markdown
Author

srpatcha commented May 5, 2026

Hi @mnriem, I've restructured the PR to contain only the .editorconfig change as originally described. The validation workflow step has been removed and will be submitted as a separate focused PR. Ready for re-review!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a root .editorconfig to standardize editor behavior in the spec-kit repository, complementing the repo’s existing formatting/linting setup.

Changes:

  • Adds global defaults for LF line endings, final newlines, UTF-8, and trailing-whitespace trimming.
  • Adds file-type-specific rules for Python, YAML, Markdown, and Makefiles.
Show a summary per file
File Description
.editorconfig Introduces repository-wide editor defaults and per-file-type formatting settings.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread .editorconfig
indent_size = 2

[*.md]
trim_trailing_whitespace = false
Comment thread .editorconfig
[*.{yml,yaml}]
indent_style = space
indent_size = 2

@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented May 5, 2026

Please address Copilot feedback

Signed-off-by: Srikanth Patchava <srpatcha@users.noreply.github.com>
@srpatcha srpatcha force-pushed the chore/add-editorconfig branch from f6abe06 to faf7b10 Compare May 6, 2026 04:48
@srpatcha
Copy link
Copy Markdown
Author

srpatcha commented May 6, 2026

Hi @mnriem @copilot, addressed the Copilot inline feedback:

  1. Markdown indent (L18) — Added \indent_size = 2\ for *.md\ to match the markdownlint config (still keeps \ rim_trailing_whitespace = false\ for hard-break lines)
  2. Bash/PowerShell coverage (L16) — Added explicit [.{sh,bash}]\ (2-space) and [.{ps1,psm1,psd1}]\ (4-space) sections for the scripts under \scripts/bash/\ and \scripts/powershell/\
  3. ✅ **Defaults moved to []* — \indent_style = space\ and \indent_size = 4\ are now defaults; specific extensions only override the size
  4. JSON coverage — Added [*.{json,jsonc}]\ at 2-space (the repo has a few config JSONs)

Force-pushed. Ready for re-review!

@srpatcha
Copy link
Copy Markdown
Author

srpatcha commented May 6, 2026

Hi @mnriem @copilot, just to confirm: the latest force-push (commit faf7b10) addresses both Copilot inline comments:

  • L18/L19 (Markdown indent) ✅ Added [*.md] indent_size = 2 to match the markdownlint 2-space requirement
  • L16 (Bash/PowerShell) ✅ Added explicit [*.{sh,bash}] indent_size = 2 and [*.{ps1,psm1,psd1}] indent_size = 4 sections covering scripts/bash/ and scripts/powershell/

The previous Copilot comments were on the older commit and may not auto-resolve since the file is now restructured (defaults moved to [*]). Let me know if anything else needs attention!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants