Skip to content

chore: add .editorconfig for consistent code formatting#2366

Merged
mnriem merged 1 commit into
github:mainfrom
srpatcha:chore/add-editorconfig
Jun 2, 2026
Merged

chore: add .editorconfig for consistent code formatting#2366
mnriem merged 1 commit into
github:mainfrom
srpatcha:chore/add-editorconfig

Conversation

@srpatcha
Copy link
Copy Markdown
Contributor

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
Contributor 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
Contributor 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
Comment thread .editorconfig
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented May 5, 2026

Please address Copilot feedback

@srpatcha srpatcha force-pushed the chore/add-editorconfig branch from f6abe06 to faf7b10 Compare May 6, 2026 04:48
@srpatcha
Copy link
Copy Markdown
Contributor 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
Contributor 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!

@mnriem mnriem requested a review from Copilot May 6, 2026 16:04
@srpatcha srpatcha force-pushed the chore/add-editorconfig branch from faf7b10 to 9c4dd68 Compare May 16, 2026 16:29
@mnriem mnriem requested review from Copilot and removed request for Copilot May 18, 2026 15:50
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.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

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.

Copilot's findings

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

Comment thread .editorconfig Outdated
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented May 21, 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 9c4dd68 to 66aeb57 Compare June 1, 2026 01:03
@srpatcha
Copy link
Copy Markdown
Contributor Author

srpatcha commented Jun 1, 2026

Hi @mnriem @copilot, fixed in commit 66aeb57: changed [*.{sh,bash}] to indent_size = 4 to match the actual indentation used in scripts/bash/common.sh, scripts/bash/create-new-feature.sh, etc. The previous 2-space setting would have caused editors to convert tabs to 2 spaces, conflicting with the existing 4-space style.

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.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

@mnriem mnriem self-requested a review June 2, 2026 14:45
@mnriem mnriem merged commit 7c558ab into github:main Jun 2, 2026
11 checks passed
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