Skip to content

chore: add .editorconfig for cross-editor consistency#84

Open
KeiaiLab-PHIL wants to merge 1 commit into
mainfrom
chore/editorconfig-add
Open

chore: add .editorconfig for cross-editor consistency#84
KeiaiLab-PHIL wants to merge 1 commit into
mainfrom
chore/editorconfig-add

Conversation

@KeiaiLab-PHIL

@KeiaiLab-PHIL KeiaiLab-PHIL commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

사용자 시나리오

operator family(mongodb-operator, valkey-operator)에서 작업하던 개발자가 keiailab-commons 로 컨텍스트 전환 시, commons 에는 .editorconfig 가 없어 편집기마다 들여쓰기/개행/인코딩이 제각각이 된다(특히 Go=tab vs 기본 space, Makefile tab 강제). 본 PR 은 operator family 와 동일한 .editorconfig 를 추가해 어느 편집기에서든 일관된 포맷팅을 보장한다.

변경 요약

  • .editorconfig 신규 1파일(+33)만 추가. Go API 무변경, helm chart 무변경, 빌드/테스트/런타임 동작 무변경 (순수 편집기 힌트 파일).
  • 내용은 mongodb-operator/.editorconfigvalkey-operator/.editorconfig(상호 byte-identical, operator family 표준)와 byte-identical.
  • 규칙: 전역 utf-8/lf/final-newline/trim-trailing/2-space, [*.go] tab(indent 4), [Makefile] tab, [*.{sh,bash}] indent 4, [*.md] trailing-whitespace 보존, [*.{yaml,yml,json}] 2-space.
  • commons 실측 컨벤션과 정합 검증 완료(Go tab / Makefile tab / chart YAML 2-space).

범위 밖 (의도적 미수행)

  • .lefthook.yml 신설 안 함: commons 는 lefthook.yml(no-dot)을 의도적으로 사용하며 이는 ADR-0011(Accepted 2026-05-21)에 명문화됨 — 과거 .lefthook.yml(dot)을 git rm 하고 통합(lefthook fallback override drift anti-pattern 제거). 기존 lefthook.yml 이 gofmt/go-vet/go-test/golangci-lint/gitleaks/conventional-commits + DCO/govulncheck 를 이미 전부 포함. .lefthook.yml 신설은 ADR-0011 가 제거한 anti-pattern 재도입 = 회귀이므로 수행 안 함.

검증

diff .editorconfig ../mongodb-operator/.editorconfig   # IDENTICAL
make fmt && make vet && go build ./...                 # exit 0 (no-op)
make test                                              # 18 패키지 전부 ok (coverage 89~100%)
helm lint charts/keiailab-commons                      # 0 failed

순수 에디터 힌트 파일이라 동작 게이트 불변. (이전 작업 시점에 관찰된 make lint baseline 13건은 병렬 머지된 #83 style(lint) 가 이미 해소 — 본 PR 과 무관.) 이 repo 는 GitHub 호스팅 — GitHub Actions 영구 금지 정책상 CI 게이트는 로컬 lefthook/Makefile/리뷰어 증거로 대체.

operator family (mongodb-operator / valkey-operator) 는 `.editorconfig` 를
보유하나 keiailab-commons 는 부재했다. 동일 표준 파일을 추가해 편집기 간
들여쓰기/개행/인코딩 일관성을 확보한다 (Go=tab, Makefile=tab, YAML/JSON=2-space,
markdown trailing-whitespace 보존).

순수 편집기 힌트 파일 — 빌드/테스트/런타임 동작 무변경, Go API 무변경.
mongodb-operator/.editorconfig 와 byte-identical (operator family 일관성 유지).

검증 (변경 전후 동일 — .go/chart 무변경이므로 동작 게이트 불변):
- diff .editorconfig mongodb-operator/.editorconfig → IDENTICAL
- make fmt → no-op (go fmt ./... 재포맷 0건)
- make vet → exit 0
- go build ./... → exit 0
- make test → 18 패키지 전부 ok (coverage 89~100%)
- make lint → 기존 baseline 13건 (errcheck:2/goconst:3/modernize:8) 동일,
  신규 0건 (본 변경은 .go 파일 무추가). baseline은 main 자체의 선존 결함.
- helm lint charts/keiailab-commons → 0 failed (chart 무변경 sanity)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: keiailab <noreply@keiailab.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.

1 participant