Skip to content

Add .editorconfig to standardize formatting across contributions#671

Merged
danielmeppiel merged 5 commits intomainfrom
copilot/add-editorconfig-for-formatting
Apr 19, 2026
Merged

Add .editorconfig to standardize formatting across contributions#671
danielmeppiel merged 5 commits intomainfrom
copilot/add-editorconfig-for-formatting

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Description

Without a .editorconfig, contributors' editors apply inconsistent formatting (trailing whitespace, final newlines, indent style), inflating diffs and making reviews harder. Adds a root .editorconfig so editors enforce consistent defaults automatically.

Settings:

  • charset = utf-8, end_of_line = lf, insert_final_newline = true
  • trim_trailing_whitespace = true globally; false for *.md (trailing spaces are semantic in Markdown — they produce <br>)
  • indent_style = space, indent_size = 4 globally (Python, shell, etc.)
  • indent_size = 2 for *.yml, *.yaml, *.json, *.md
  • indent_style = tab for Makefile (required by make)

No existing files modified — isolated to the new config file only.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Agent-Logs-Url: https://github.com/microsoft/apm/sessions/61b89d0e-2a7c-4151-9038-3901de393295

Co-authored-by: sergio-sisternes-epam <207026618+sergio-sisternes-epam@users.noreply.github.com>
Copilot AI changed the title [WIP] Add .editorconfig to standardize formatting across contributions Add .editorconfig to standardize formatting across contributions Apr 10, 2026
@sergio-sisternes-epam sergio-sisternes-epam marked this pull request as ready for review April 10, 2026 17:40
Copilot AI review requested due to automatic review settings April 10, 2026 17:40
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

Adds a repository-root .editorconfig to standardize basic formatting across editors, reducing noise in diffs and making contributions more consistent across the codebase.

Changes:

  • Introduces a root .editorconfig with consistent defaults (LF, final newline, trimming whitespace, 4-space indent).
  • Adds filetype-specific overrides (2-space indent for YAML/JSON/Markdown; preserve Markdown trailing spaces; tabs for Makefile).

Copy link
Copy Markdown
Collaborator

@sergio-sisternes-epam sergio-sisternes-epam left a comment

Choose a reason for hiding this comment

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

Validated against the codebase: 4-space Python, 2-space YAML/JSON/MD, LF line endings, UTF-8 — all match existing conventions. Clean isolated config, no files modified. LGTM.

@tillig
Copy link
Copy Markdown
Contributor

tillig commented Apr 10, 2026

If you want to require a particular line ending for a file type you may also need to update .gitattributes to ensure folks trying to contribute from Windows don't accidentally mess up the line endings.

Alternatively, it may be interesting to...

  • Not specify line endings in .editorconfig unless it's really important (like in shell scripts where CRLF may not be interpreted right regardless of OS)
  • Set .gitattributes to include * text=auto to ensure line endings are auto-handled regardless of Git client config.

@sergio-sisternes-epam
Copy link
Copy Markdown
Collaborator

sergio-sisternes-epam commented Apr 10, 2026

@copilot review feedback

@danielmeppiel danielmeppiel added CI/CD and removed CI/CD labels Apr 19, 2026
@danielmeppiel danielmeppiel added this pull request to the merge queue Apr 19, 2026
Merged via the queue into main with commit d190d07 Apr 19, 2026
9 checks passed
@danielmeppiel danielmeppiel deleted the copilot/add-editorconfig-for-formatting branch April 19, 2026 18:57
danielmeppiel added a commit that referenced this pull request Apr 19, 2026
Resolve CHANGELOG conflict: keep [0.8.12] release section (which already
incorporates #616/#671/#681 from main's Unreleased), and add #766 entry
for the codex/opencode --target compile fix that landed via #769.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Add .editorconfig to standardize formatting across contributions

5 participants