Skip to content

chore(update-checker): .editorconfig and .gitattributes#33

Merged
stasadev merged 2 commits intoddev:mainfrom
mparker17:add-editorconfig
May 4, 2026
Merged

chore(update-checker): .editorconfig and .gitattributes#33
stasadev merged 2 commits intoddev:mainfrom
mparker17:add-editorconfig

Conversation

@mparker17
Copy link
Copy Markdown
Contributor

@mparker17 mparker17 commented Apr 30, 2026

The Issue

(I didn't create an issue for this)

I was working on a shell script for a different merge request, and noticed that my editor's defaults didn't match ddev conventions. I went looking for a .editorconfig and didn't find one in this repo.

How This PR Solves The Issue

I copied the .editorconfig from ddev/ddev at commit 9e1a27142e830b55da9b82ab53c8e1590dc7be3a (which was the HEAD of main at time-of-writing) into this repo.

Manual Testing Instructions

  1. Clone this branch
  2. Create a new .sh file in the project using an editor that supports the EditorConfig standard with default configuration
  3. Press the tab key:
    • Expected behavior: your cursor is indented 2 spaces
    • Previous behavior: your cursor is indented by something else (for me it was 4 spaces; but depending on the editor, it could be 8 spaces or 1 tab)

Automated Testing Overview

I don't think automatically testing text editors is within the scope of the ddev project, although I suppose, if desired, I could try to figure out how to write a browser-based test for a browser-based editor like VSCode, although I feel that would be very brittle and would unnecessarily extend the scope of this issue.

Release/Deployment Notes

Only affects people trying to contribute to this add-on.

Nothing needs to be done on deployment.

Copy link
Copy Markdown
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

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

Thanks for thinking about it, even if it doesn't affect the addon itself.

Let's add it to https://github.com/ddev/ddev-addon-template first.

After that, all downstream add-ons can be updated accordingly (with Update Checker, which could have a proper check for this https://github.com/ddev/ddev-addon-template/blob/main/.github/scripts/update-checker.sh).

We don't actually need all these rules for add-ons. We could use https://github.com/laravel/laravel/blob/13.x/.editorconfig as a base with some changes for [*.sh], etc.

Also the exclusion for .editorconfig export-ignore should be added to .gitattributes (it's not here because I haven't updated this add-on in a long time).

@mparker17
Copy link
Copy Markdown
Contributor Author

@stasadev done.

Should I update this MR with the new .editorconfig, or should I close this MR so you can merge in the upstream changes?

@stasadev
Copy link
Copy Markdown
Member

stasadev commented May 1, 2026

Should I update this MR with the new .editorconfig

Yes, please update it.

@stasadev stasadev force-pushed the add-editorconfig branch from 560c4c5 to 481cd6e Compare May 4, 2026 18:07
@stasadev stasadev changed the title feat: Add a .editorconfig. chore(update-checker): .editorconfig and .gitattributes May 4, 2026
@stasadev stasadev merged commit 408cf8d into ddev:main May 4, 2026
@stasadev
Copy link
Copy Markdown
Member

stasadev commented May 4, 2026

I updated it.

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.

2 participants