chore: add .editorconfig for cross-editor consistency#84
Open
KeiaiLab-PHIL wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
사용자 시나리오
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/.editorconfig및valkey-operator/.editorconfig(상호 byte-identical, operator family 표준)와 byte-identical.[*.go]tab(indent 4),[Makefile]tab,[*.{sh,bash}]indent 4,[*.md]trailing-whitespace 보존,[*.{yaml,yml,json}]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 재도입 = 회귀이므로 수행 안 함.검증