-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.commit-checker.schema.json
More file actions
749 lines (734 loc) · 33.2 KB
/
Copy path.commit-checker.schema.json
File metadata and controls
749 lines (734 loc) · 33.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/zcube/commit-checker/blob/main/.commit-checker.schema.json",
"title": "commit-checker configuration",
"description": "Configuration schema for commit-checker (.commit-checker.yml) — schema v1.2.0 (locale 통일: required_language → locale)",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "commit-checker 전체 활성화 여부 (기본값: true).\n전역 훅(git config --global)으로 모든 리포에서 실행되는 환경에서, 특정 리포만 enabled: false 한 줄로 모든 검사를 비활성화(opt-out)할 때 사용.\n프로젝트 설정이 있으면 전역 설정은 무시되며, preset 병합 시 본문 값이 preset 보다 우선함.",
"type": "boolean",
"default": true
},
"preset": {
"description": "원격 URL에서 불러올 기본 설정 프리셋. 해당 URL에서 .commit-checker.yml 형식의 YAML을 가져와 기본 설정으로 사용하며, 로컬 설정이 프리셋 설정을 override함.\n프로젝트 설정이 있으면 전역 설정은 완전히 무시되고 프로젝트 설정 > 프로젝트의 프리셋 순으로 적용됨. 전역 설정은 프로젝트 설정이 없을 때만 사용되며, 그때는 전역 설정 > 전역의 프리셋 순으로 적용됨.\n프리셋 안에 preset.url을 다시 지정할 수 없음 (중첩 프리셋 미지원).",
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"description": "프리셋 설정 파일을 가져올 HTTP/HTTPS URL.",
"type": "string",
"format": "uri",
"examples": ["https://example.com/presets/.commit-checker.yml"]
},
"cache": {
"description": "URL에서 가져온 프리셋의 로컬 캐싱 설정.",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "캐싱 활성화 여부 (기본값: false)",
"type": "boolean",
"default": false
},
"ttl": {
"description": "캐시 유효 기간 (기본값: 24h). Go time.ParseDuration 형식.",
"type": "string",
"default": "24h",
"examples": ["1h", "30m", "24h", "168h"]
},
"dir": {
"description": "캐시 디렉터리 경로 (기본값: ~/.cache/commit-checker)",
"type": "string"
}
}
}
}
},
"include": {
"description": "조건부 설정 포함 규칙 목록 (git 의 [includeIf \"gitdir:...\"] 와 유사).\n각 항목의 path 파일을 베이스로 순서대로 병합한 뒤 본문을 그 위에 병합함.\n우선순위: 본문 값 > 나중 include > 앞 include.\n원격 preset 설정 안의 include 는 보안상 무시되며, 포함된 파일 안의 include 도 무시됨 (중첩 금지). 누락 파일은 경고 후 건너뜀.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"description": "포함할 설정 파일 경로. '~' 는 홈 디렉터리로 확장되고, 상대 경로는 include 를 선언한 설정 파일 기준.",
"type": "string",
"examples": ["~/.config/commit-checker/base.yml"]
},
"gitdir": {
"description": "포함 조건이 되는 디렉터리 glob 패턴 (git includeIf gitdir 의미론). 비어있으면 항상 포함.\n'~' 는 홈 디렉터리로 확장되고, '/' 로 끝나면 '**' 가 덧붙어 해당 디렉터리와 하위 전체를 매칭.",
"type": "string",
"examples": ["~/work/"]
}
}
}
},
"comment_language": {
"description": "코드 주석의 언어를 검사하는 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "주석 언어 검사 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
},
"required_language": {
"description": "[deprecated — v1.2.0부터 locale 사용 권장] 주석에 사용해야 하는 자연어 (기본값: korean). locale이 설정된 경우 override됨. 하위 호환을 위해 유지되며 'commit-checker migrate'로 locale로 변환 가능.",
"deprecated": true,
"type": "string",
"enum": ["korean", "english", "japanese", "chinese", "any"],
"default": "korean"
},
"locale": {
"description": "required_language를 자동으로 설정하는 BCP-47 로케일 코드. 설정 시 required_language를 덮어씀.",
"type": "string",
"examples": ["ko", "en", "ja", "zh", "zh-hans", "zh-hant"]
},
"min_length": {
"description": "언어 검사를 수행할 최소 글자 수 (기본값: 5). 이보다 짧은 주석은 검사하지 않음.",
"type": "integer",
"minimum": 1,
"default": 5
},
"check_mode": {
"description": "검사 범위 설정 (기본값: diff).\n diff: staged diff에서 추가된 라인의 주석만 검사 (빠름)\n full: staged 파일 전체의 주석을 검사",
"type": "string",
"enum": ["diff", "full"],
"default": "diff"
},
"languages": {
"description": "파싱할 프로그래밍 언어 목록. 설정 시 extensions보다 우선 적용됨.",
"type": "array",
"items": {
"type": "string",
"enum": ["go", "typescript", "javascript", "java", "kotlin", "python", "c", "cpp", "csharp", "swift", "rust", "dockerfile", "markdown", "hcl"]
},
"examples": [["go", "typescript", "python"]],
"uniqueItems": true
},
"extensions": {
"description": "검사할 파일 확장자 목록. languages가 설정되지 않은 경우 사용됨.",
"type": "array",
"items": {
"type": "string",
"pattern": "^(\\.[a-zA-Z0-9]+|dockerfile)$"
},
"default": [".go", ".ts", ".tsx", ".js", ".jsx", ".mjs", ".java", ".kt", ".py", ".c", ".cpp", ".cs", ".swift", ".rs", ".hcl", ".tf", ".tfvars", "dockerfile"],
"examples": [[".go", ".ts", ".py"]]
},
"skip_directives": {
"description": "검사를 건너뛸 추가 주석 접두사 목록. 내장 skip 목록(todo, fixme, nolint 등)에 병합됨.",
"type": "array",
"items": { "type": "string" },
"examples": [["internal:", "ref:", "see:"]]
},
"ignore_files": {
"description": "주석 언어 검사에서 제외할 파일 glob 패턴 목록. '**' 지원.",
"type": "array",
"items": { "type": "string" },
"examples": [["**/*_test.go", "vendor/**", "*.pb.go", "internal/generated/**"]]
},
"no_emoji": {
"description": "주석에서 이모지 사용 금지 여부 (기본값: false).\ntrue이면 소스 코드 주석에 이모지가 포함된 경우 에러 보고.",
"type": "boolean",
"default": false
},
"check_strings": {
"description": "문자열 리터럴도 주석과 동일하게 언어 검사 여부 (기본값: false).\ntrue로 설정하면 소스 코드 내 string literal에도 required_language가 적용됨.",
"type": "boolean",
"default": false
},
"skip_technical_strings": {
"description": "check_strings=true일 때 기술적 식별자로 판단되는 문자열을 건너뜀 (기본값: true).\n건너뜀 조건:\n - 슬래시(/) 포함 → 경로 또는 MIME 타입 (예: /api/v1, application/json)\n - 소문자 없는 순수 ASCII → 대문자 상수 (예: ERR_TOKEN, MAX_SIZE)\nfalse로 설정하면 모든 문자열을 언어 검사함.",
"type": "boolean",
"default": true
},
"allowed_words": {
"description": "언어 검사에서 무시할 영어 단어 목록.\n주석에서 해당 단어를 제거한 후 나머지 텍스트로 언어를 판별.\n고유명사, 기술 용어 등에 활용.",
"type": "array",
"items": { "type": "string" },
"examples": [["TypeScript", "JavaScript", "API", "URL"]]
},
"allowed_words_file": {
"description": "허용 단어가 한 줄에 하나씩 적힌 텍스트 파일 경로.\n# 으로 시작하는 줄은 주석으로 무시. allowed_words와 병합.",
"type": "string",
"examples": [".commit-checker-words.txt"]
},
"allowed_words_url": {
"description": "허용 단어 파일을 HTTP/HTTPS로 가져올 URL.\nallowed_words, allowed_words_file과 병합.",
"type": "string",
"format": "uri",
"examples": ["https://example.com/allowed-words.txt"]
},
"allowed_words_cache": {
"description": "URL에서 가져온 허용 단어의 로컬 캐싱 설정.",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "캐싱 활성화 여부 (기본값: false)",
"type": "boolean",
"default": false
},
"ttl": {
"description": "캐시 유효 기간 (기본값: 24h). Go time.ParseDuration 형식.",
"type": "string",
"default": "24h",
"examples": ["1h", "30m", "24h", "168h"]
},
"dir": {
"description": "캐시 디렉터리 경로 (기본값: ~/.cache/commit-checker)",
"type": "string"
}
}
},
"file_languages": {
"description": "파일별 언어 규칙 목록. 첫 번째 일치 패턴이 적용됨 (순서 중요).",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["pattern"],
"properties": {
"pattern": {
"description": "파일 경로에 매칭할 glob 패턴. '**' 지원.",
"type": "string",
"examples": ["locales/**", "i18n/**", "locale/ja/**"]
},
"locale": {
"description": "이 패턴에 매칭된 파일에서 요구할 자연어. BCP-47 코드(ko, en, ja, zh) 또는 legacy 언어명(korean, english 등) 또는 'any' 사용 가능.",
"type": "string",
"examples": ["any", "ko", "en", "ja", "zh", "korean", "english"]
},
"language": {
"description": "이 패턴에 매칭된 파일에서 요구할 언어. 로케일 코드(ko, en, ja, zh) 및 'any' 사용 가능.",
"type": "string",
"examples": ["any", "english", "korean", "japanese", "chinese", "ko", "en", "ja", "zh"]
}
}
},
"examples": [
[
{ "pattern": "locales/**", "language": "any" },
{ "pattern": "i18n/**", "language": "english" },
{ "pattern": "locale/ja/**", "language": "ja" }
]
]
}
}
},
"binary_file": {
"description": "바이너리 파일(컴파일된 실행파일 등) 커밋 차단 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "바이너리 파일 감지 활성화 여부 (기본값: true).\ngit diff --staged --numstat에서 바이너리로 판별된 파일을 감지하여 커밋을 차단함.",
"type": "boolean",
"default": true
},
"default_policy": {
"description": "어느 규칙에도 매칭되지 않은 바이너리에 대한 정책 (기본값: block).\n block: 차단 (에러)\n allow: 허가 (통과)\n lfs: git LFS로 추적되는 경우만 허가, 아니면 차단\n우선순위: rules (확장자 매칭) > 내장 이미지 정책(이미지 확장자 → allow) > default_policy",
"type": "string",
"enum": ["block", "allow", "lfs"],
"default": "block"
},
"rules": {
"description": "확장자별 바이너리 정책 규칙 목록. 첫 번째 매칭 규칙이 적용됨.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"extensions": {
"description": "정책을 적용할 파일 확장자 목록 (.png, .jpg 등). 대소문자 무관.",
"type": "array",
"items": { "type": "string" },
"examples": [[".png", ".jpg"], [".psd", ".zip"]]
},
"policy": {
"description": "적용할 정책 (block | allow | lfs).",
"type": "string",
"enum": ["block", "allow", "lfs"]
}
}
},
"examples": [
[
{ "extensions": [".psd", ".zip"], "policy": "lfs" },
{ "extensions": [".exe"], "policy": "block" }
]
]
},
"ignore_files": {
"description": "바이너리 파일 검사에서 제외할 파일 glob 패턴 목록. '**' 지원.\n이미지, 폰트 등 의도적으로 포함하는 바이너리 파일을 허용.",
"type": "array",
"items": { "type": "string" },
"examples": [["**/*.png", "**/*.jpg", "**/*.woff2", "**/*.pdf"]]
}
}
},
"lint": {
"description": "데이터 파일(YAML, JSON, XML) 구문 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "lint 검사 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
},
"yaml": {
"description": "YAML 구문 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "YAML lint 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
},
"comment_filter": {
"description": "true이면 파일 내 \"# commit-checker: skip-lint\" 주석으로 해당 파일의 YAML lint 검사를 비활성화할 수 있음 (기본값: false).",
"type": "boolean",
"default": false
},
"ignore_files": {
"description": "YAML lint에서 제외할 glob 패턴 목록",
"type": "array",
"items": { "type": "string" }
}
}
},
"json": {
"description": "JSON 구문 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "JSON lint 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
},
"allow_json5": {
"description": "JSON5 형식 허용 여부 (기본값: false).\ntrue이면 // 주석, /* */ 블록 주석, trailing comma를 허용.",
"type": "boolean",
"default": false
},
"comment_filter": {
"description": "true이면 .json 파일에서 // 및 /* */ 주석을 제거한 후 strict JSON 검사 수행 (JSONC 모드, 기본값: false).\n.jsonc 파일은 이 설정과 무관하게 항상 JSON5로 검사됨.",
"type": "boolean",
"default": false
},
"ignore_files": {
"description": "JSON lint에서 제외할 glob 패턴 목록.\n기본 제외: package-lock.json, yarn.lock 등 auto-generated 파일.\n설정 시 기본 목록을 덮어씀.",
"type": "array",
"items": { "type": "string" },
"examples": [["package-lock.json", "*.generated.json"]]
}
}
},
"xml": {
"description": "XML 구문 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "XML lint 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
},
"ignore_files": {
"description": "XML lint에서 제외할 glob 패턴 목록",
"type": "array",
"items": { "type": "string" }
}
}
},
"toml": {
"description": "TOML 구문 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "TOML lint 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
},
"ignore_files": {
"description": "TOML lint에서 제외할 glob 패턴 목록",
"type": "array",
"items": { "type": "string" }
}
}
}
}
},
"encoding": {
"description": "파일 인코딩 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "인코딩 검사 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
},
"require_utf8": {
"description": "UTF-8 인코딩 필수 여부 (기본값: true).\ntrue이면 UTF-8이 아닌 텍스트 파일의 커밋을 차단.",
"type": "boolean",
"default": true
},
"no_invisible_chars": {
"description": "파일 내용에서 비가시 유니코드 문자(NBSP, ZWSP, BiDi 제어 등) 금지 여부 (기본값: false).",
"type": "boolean",
"default": false
},
"no_ambiguous_chars": {
"description": "파일 내용에서 ASCII와 혼동되는 유니코드 문자 금지 여부 (기본값: false).\n키릴 А(U+0410) vs 라틴 A(U+0041) 등을 감지.",
"type": "boolean",
"default": false
},
"locale": {
"description": "모호한 문자 감지에 사용할 BCP 47 로케일 (기본값: ko).",
"type": "string",
"enum": ["ko", "ja", "zh-hans", "zh-hant", "ru", "_default"],
"default": "ko"
},
"ignore_files": {
"description": "인코딩 검사에서 제외할 glob 패턴 목록",
"type": "array",
"items": { "type": "string" },
"examples": [["**/*.bin", "legacy/**"]]
}
}
},
"editorconfig": {
"description": ".editorconfig 규칙 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": ".editorconfig 검사 활성화 여부 (기본값: true).\n.editorconfig 파일이 없으면 자동으로 건너뜀.",
"type": "boolean",
"default": true
},
"ignore_files": {
"description": "editorconfig 검사에서 제외할 파일 glob 패턴 목록. '**' 지원.",
"type": "array",
"items": { "type": "string" },
"examples": [["vendor/**", "**/*.generated.go"]]
}
}
},
"commit_message": {
"description": "커밋 메시지 정책 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "커밋 메시지 검사 전체 활성화 여부 (기본값: true).\nfalse이면 no_ai_coauthor, no_unicode_spaces 등 모든 하위 검사를 건너뜀.",
"type": "boolean",
"default": true
},
"no_ai_coauthor": {
"description": "AI 도구의 Co-authored-by: 트레일러 차단 여부 (기본값: true).\n내장 AI 이메일 패턴(Copilot, Claude, Cursor, Codeium 등)과 일치하는 줄을 거부.\n일반 사람 공동 작업자는 영향을 받지 않음.",
"type": "boolean",
"default": true
},
"coauthor_remove_emails": {
"description": "내장 AI 패턴에 추가로 제거할 이메일 주소 또는 glob 패턴 목록.\n'*' 와일드카드 지원 (예: \"*@myai.internal\"). 대소문자 무시.\n내장 AI 패턴: *copilot*@*, noreply@anthropic.com, *@cursor.sh, *@codeium.com, *@tabnine.com 등.",
"type": "array",
"items": { "type": "string" },
"examples": [
["*@myai.internal"],
["aibot@company.com", "*@custom-ai.io"]
]
},
"no_unicode_spaces": {
"description": "비표준 유니코드 공백 문자 금지 여부 (기본값: true).\nNBSP(U+00A0), EM SPACE(U+2003), ZWSP(U+200B), BiDi 제어문자 등 포함.\nBOM(U+FEFF)은 유효한 인코딩 마커로 허용.",
"type": "boolean",
"default": true
},
"no_ambiguous_chars": {
"description": "ASCII와 시각적으로 유사하지만 다른 코드포인트인 유니코드 문자 금지 여부 (기본값: true).\n예: 키릴 А(U+0410) vs 라틴 A(U+0041). Gitea/VSCode 유니코드 데이터 기반.",
"type": "boolean",
"default": true
},
"no_bad_runes": {
"description": "잘못된 UTF-8 바이트 시퀀스 금지 여부 (기본값: true).",
"type": "boolean",
"default": true
},
"no_emoji": {
"description": "커밋 메시지에서 이모지 사용 금지 여부 (기본값: false).\ntrue이면 커밋 메시지에 이모지가 포함된 경우 에러 보고.",
"type": "boolean",
"default": false
},
"locale": {
"description": "모호한 문자 감지에 사용할 BCP 47 로케일 (기본값: ko).\n로케일별 혼동 문자 테이블(Gitea 기반)을 선택함.",
"type": "string",
"enum": ["ko", "ja", "zh-hans", "zh-hant", "ru", "_default"],
"default": "ko"
},
"conventional_commit": {
"description": "Conventional Commits 형식 강제 설정 (https://www.conventionalcommits.org/).\n형식: <type>[(<scope>)][!]: <description>",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "컨벤셔널 커밋 형식 검사 활성화 여부 (기본값: false)",
"type": "boolean",
"default": false
},
"types": {
"description": "허용된 커밋 타입 목록.\n기본값: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert",
"type": "array",
"items": { "type": "string" },
"default": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"]
},
"type_aliases": {
"description": "로컬라이즈된 타입 별칭 매핑.\n키: 로컬라이즈된 타입, 값: 표준 타입.\n예: {\"기능\": \"feat\", \"수정\": \"fix\"}\n설정하면 로컬라이즈된 타입도 커밋에 사용 가능.",
"type": "object",
"additionalProperties": { "type": "string" },
"examples": [{"기능": "feat", "수정": "fix", "문서": "docs"}]
},
"locale": {
"description": "로컬라이즈된 타입 기본값을 적용할 언어.\ntype_aliases가 설정되지 않은 경우 내장 매핑 사용.\n지원: ko, ja, zh",
"type": "string",
"enum": ["ko", "ja", "zh"],
"examples": ["ko", "ja", "zh"]
},
"require_scope": {
"description": "스코프 필수 여부 (기본값: false). true이면 feat(scope): 형식 필수.",
"type": "boolean",
"default": false
},
"allow_merge_commits": {
"description": "\"Merge ...\" 커밋은 형식 검사 건너뜀 (기본값: true)",
"type": "boolean",
"default": true
},
"allow_revert_commits": {
"description": "\"Revert ...\" 커밋은 형식 검사 건너뜀 (기본값: true)",
"type": "boolean",
"default": true
}
}
},
"language_check": {
"description": "커밋 메시지 본문의 자연어 검사 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "커밋 메시지 언어 검사 활성화 여부 (기본값: false)",
"type": "boolean",
"default": false
},
"locale": {
"description": "커밋 메시지 본문에 요구되는 자연어. BCP-47 코드(ko, en, ja, zh) 또는 legacy 언어명(korean, english 등) 허용.\n비어있으면 commit_message.locale에서 자동 유도됨. 설정 시 required_language를 덮어씀.",
"type": "string",
"examples": ["ko", "en", "ja", "zh", "zh-hans", "zh-hant"]
},
"required_language": {
"description": "커밋 메시지에 사용해야 하는 자연어 (기본값: korean)",
"type": "string",
"enum": ["korean", "english", "japanese", "chinese", "any"],
"default": "korean"
},
"min_length": {
"description": "언어 검사를 수행할 최소 글자 수 (기본값: 5)",
"type": "integer",
"minimum": 1,
"default": 5
},
"skip_prefixes": {
"description": "언어 검사를 건너뛸 제목 줄 접두사 목록.\n해당 접두사로 시작하는 커밋은 전체 메시지 검사를 건너뜀.\n기본값: [\"Merge\", \"Revert\", \"fixup!\", \"squash!\"]",
"type": "array",
"items": { "type": "string" },
"default": ["Merge", "Revert", "fixup!", "squash!"],
"examples": [["Merge", "Revert", "fixup!", "squash!", "WIP:"]]
}
}
},
"subject_limit": {
"description": "커밋 메시지 제목(첫 번째 줄) 글자 수 제한 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "제목 길이 검사 활성화 여부 (기본값: false)",
"type": "boolean",
"default": false
},
"max_length": {
"description": "제목 최대 글자 수 (기본값: 72)",
"type": "integer",
"minimum": 1,
"default": 72
}
}
},
"body_line_limit": {
"description": "커밋 메시지 본문 각 줄의 글자 수 제한 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "본문 줄 길이 검사 활성화 여부 (기본값: false)",
"type": "boolean",
"default": false
},
"max_length": {
"description": "본문 각 줄 최대 글자 수 (기본값: 100)",
"type": "integer",
"minimum": 1,
"default": 100
}
}
}
}
},
"exceptions": {
"description": "전역 및 기능별 파일 제외 패턴 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"global_ignore": {
"description": "모든 검사에서 제외할 파일 glob 패턴 목록. '**' 지원.",
"type": "array",
"items": { "type": "string" },
"examples": [["vendor/**", "third_party/**"]]
},
"comment_language_ignore": {
"description": "주석 언어 검사에서만 제외할 파일 glob 패턴 목록. '**' 지원.",
"type": "array",
"items": { "type": "string" },
"examples": [["legacy/**", "*.generated.go"]]
}
}
},
"custom_rules": {
"description": "정규식 기반 커스텀 규칙 설정",
"type": "object",
"additionalProperties": false,
"properties": {
"commit_message": {
"description": "커밋 메시지에 적용할 커스텀 규칙 목록",
"type": "array",
"items": { "$ref": "#/definitions/customRule" }
},
"diff": {
"description": "스테이지된 diff의 추가된 줄에 적용할 커스텀 규칙 목록",
"type": "array",
"items": { "$ref": "#/definitions/customRule" }
}
}
},
"protected_paths": {
"description": "glob 패턴에 매칭되는 경로의 모든 변경(추가·수정·삭제)을 금지하는 보호 경로 설정.\nappend_only보다 강한 \"완전 동결\" 정책. 잠긴 레거시 디렉터리, 자동 생성 파일, 릴리스된 마이그레이션 등에 사용.",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "보호 경로 검사 활성화 여부 (기본값: false). paths가 비어 있으면 검사하지 않음.",
"type": "boolean",
"default": false
},
"paths": {
"description": "보호 경로 규칙을 적용할 glob 패턴 목록",
"type": "array",
"items": { "type": "string" },
"examples": [["legacy/**", "generated/**"]]
}
}
},
"append_only": {
"description": "특정 경로에서 파일 삭제·내용 수정·중간 삽입을 금지하는 append-only 설정.\nDB 마이그레이션 디렉터리 등 한 번 커밋한 내용을 변경해서는 안 되는 경우에 사용.",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "append-only 검사 활성화 여부 (기본값: false). paths가 비어 있으면 검사하지 않음.",
"type": "boolean",
"default": false
},
"paths": {
"description": "append-only 규칙을 적용할 glob 패턴 목록",
"type": "array",
"items": { "type": "string" },
"examples": [["migrations/**", "db/migrations/**"]]
},
"filename_order": {
"description": "새 파일 이름이 기존 파일보다 뒤에 와야 하는지 검사.\n numeric (또는 빈 문자열, 기본값): 자연수(numeric) 정렬 기준으로 기존 파일 중 최대값보다 뒤에 와야 함\n none: 파일 이름 순서 검사 비활성화",
"type": "string",
"enum": ["numeric", "none", ""],
"default": "numeric"
}
}
},
"cache_dir": {
"description": "빌드 산출물·캐시 디렉터리(node_modules, dist, build, target, __pycache__ 등) 안의 파일이 git에 커밋되거나 스테이지되는지 검사하는 설정.\n부모 디렉터리 인디케이터(go.mod, package.json 등) 기반으로 판별.",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "캐시/빌드 디렉터리 검사 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
},
"ignore_dirs": {
"description": "검사에서 제외할 디렉터리 이름 목록.\n예: 의도적으로 vendor/ 를 커밋하는 Go 프로젝트에서 [\"vendor\"] 지정.",
"type": "array",
"items": { "type": "string" },
"examples": [["vendor"], ["node_modules", "dist"]]
}
}
},
"guide": {
"description": "검사 위반 시 출력하는 카테고리별 개선 가이드 설정.\n위반 목록·요약 뒤에 수정 방법(구체적 명령어·행동)을 카테고리당 1회 출력.",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"description": "개선 가이드 출력 활성화 여부 (기본값: true)",
"type": "boolean",
"default": true
}
}
}
},
"definitions": {
"customRule": {
"description": "정규식 기반 커스텀 검사 규칙",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "규칙 이름 (오류 메시지에 표시됨)",
"type": "string",
"examples": ["no-wip", "require-issue-number"]
},
"pattern": {
"description": "Go 정규식 패턴 (regexp.Compile 호환)",
"type": "string",
"examples": ["(?i)\\bWIP\\b", "#[0-9]+"]
},
"message": {
"description": "규칙 위반 시 표시할 사람이 읽기 쉬운 메시지",
"type": "string"
},
"required": {
"description": "true이면 패턴이 반드시 일치해야 함 (불일치 시 오류).\nfalse(기본값)이면 패턴이 일치하면 안 됨 (일치 시 오류, forbidden 규칙).",
"type": "boolean",
"default": false
}
}
}
}
}