Skip to content

chore: add .editorconfig to enforce consistent formatting#44

Open
omghante wants to merge 1 commit into
PhonePe:mainfrom
omghante:chore/43-add-editorconfig
Open

chore: add .editorconfig to enforce consistent formatting#44
omghante wants to merge 1 commit into
PhonePe:mainfrom
omghante:chore/43-add-editorconfig

Conversation

@omghante

Copy link
Copy Markdown

Description

Add an .editorconfig file to enforce consistent formatting across all editors. Settings match the existing Spotless and formatter.xml configuration so contributors get the right indentation out of the box.

Related Issue

Fixes #43

Changes Made

  • Added .editorconfig at the repo root with:
    • Tab indentation for Java files (matches formatter.xml)
    • Space indentation for XML and YAML files
    • UTF-8 charset and LF line endings
    • Final newline insertion (matches Spotless endWithNewline)
    • Preserve trailing whitespace in Markdown files

How to Test

  1. Open a Java file in VS Code or IntelliJ — editor should auto-use tabs
  2. Open a YAML file — editor should auto-use 2-space indentation

Checklist

  • I have read the CONTRIBUTING.md guide
  • Code follows the project's style guidelines
  • Tests added for new functionality (if applicable) — N/A, config only
  • All tests pass (mvn clean verify)
  • Documentation updated (if applicable)

- Tab indentation for Java files (matches Spotless/formatter.xml)
- Space indentation for XML and YAML files
- UTF-8 charset and LF line endings
- Final newline insertion (matches Spotless endWithNewline)
- Preserve trailing whitespace in Markdown files

Fixes PhonePe#43
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 enforce tab-based indentation

1 participant