Skip to content

Commit 3afff68

Browse files
committed
docs: refine README global policy guidance
1 parent f57cc86 commit 3afff68

4 files changed

Lines changed: 77 additions & 15 deletions

File tree

README.en.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,29 @@ The global config file is resolved in the following order; the **first existing
296296
| 4 | `~/.commit-checker.yml` (legacy, backward compatibility) |
297297

298298
```yaml
299-
# ~/.config/commit-checker/config.yml — minimal global config example
300-
comment_language:
301-
locale: en
299+
# Global config example
300+
# macOS: ~/Library/Application Support/commit-checker/config.yml
301+
# Linux: ~/.config/commit-checker/config.yml
302302
commit_message:
303303
no_ai_coauthor: true
304-
locale: en
304+
no_unicode_spaces: true
305+
no_ambiguous_chars: true
306+
no_bad_runes: true
307+
no_emoji: true
308+
locale: ko
309+
310+
conventional_commit:
311+
enabled: true
312+
locale: en
313+
314+
language_check:
315+
enabled: true
316+
locale: ko
305317
```
306318

319+
- Set `COMMIT_CHECKER_GLOBAL_CONFIG` if you want to pin the global config path explicitly.
320+
- On macOS, `os.UserConfigDir()` resolves to `~/Library/Application Support/commit-checker/config.yml`, so that is the default global location.
321+
307322
### Per-directory policies (gitdir include)
308323

309324
Conditional includes corresponding to git's `[includeIf "gitdir:..."]` are supported.

README.ja.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,30 @@ git config set --global --append hook.commit-checker-msg.event commit-msg
295295
| 4 | `~/.commit-checker.yml`(legacy、後方互換) |
296296

297297
```yaml
298-
# ~/.config/commit-checker/config.yml — シンプルなグローバル設定の例
299-
comment_language:
300-
locale: ja
298+
# グローバル設定の例
299+
# macOS: ~/Library/Application Support/commit-checker/config.yml
300+
# Linux: ~/.config/commit-checker/config.yml
301301
commit_message:
302302
no_ai_coauthor: true
303-
locale: ja
303+
no_unicode_spaces: true
304+
no_ambiguous_chars: true
305+
no_bad_runes: true
306+
no_emoji: true
307+
locale: ko
308+
309+
conventional_commit:
310+
enabled: true
311+
locale: en
312+
313+
language_check:
314+
enabled: true
315+
locale: ko
304316
```
305317

318+
- `COMMIT_CHECKER_GLOBAL_CONFIG` を使うと、グローバル設定ファイルの場所を明示的に固定できます。
319+
- macOS では `os.UserConfigDir()` が `~/Library/Application Support/commit-checker/config.yml` を返すため、これが既定のグローバル設定場所になります。
320+
- この例では、AI co-author の削除、Unicode 空白、紛らわしい文字、壊れた UTF-8、絵文字禁止を有効にし、Conventional Commits は英語タイプのみ、本文は韓国語で検査します。
321+
306322
### ディレクトリ別ポリシー(gitdir include)
307323

308324
git の `[includeIf "gitdir:..."]` に対応する条件付き include をサポートします。

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,29 @@ git config set --global --append hook.commit-checker-msg.event commit-msg
295295
| 4 | `~/.commit-checker.yml` (legacy, 하위 호환) |
296296

297297
```yaml
298-
# ~/.config/commit-checker/config.yml — 간단한 전역 설정 예시
299-
comment_language:
300-
locale: ko
298+
# 전역 설정 예시
299+
# macOS: ~/Library/Application Support/commit-checker/config.yml
300+
# Linux: ~/.config/commit-checker/config.yml
301301
commit_message:
302302
no_ai_coauthor: true
303+
no_unicode_spaces: true
304+
no_ambiguous_chars: true
305+
no_bad_runes: true
306+
no_emoji: true
303307
locale: ko
308+
309+
conventional_commit:
310+
enabled: true
311+
locale: en
312+
313+
language_check:
314+
enabled: true
315+
locale: ko
304316
```
305317

318+
- `COMMIT_CHECKER_GLOBAL_CONFIG` 를 쓰면 전역 설정 파일 위치를 명시적으로 고정할 수 있습니다.
319+
- macOS에서는 `os.UserConfigDir()` 경로가 우선되어 `~/Library/Application Support/commit-checker/config.yml` 이 기본 전역 설정 위치가 됩니다.
320+
306321
### 디렉터리별 정책 (gitdir include)
307322

308323
git 의 `[includeIf "gitdir:..."]` 에 대응하는 조건부 include 를 지원합니다.

README.zh.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,30 @@ git config set --global --append hook.commit-checker-msg.event commit-msg
295295
| 4 | `~/.commit-checker.yml`(legacy,向后兼容) |
296296

297297
```yaml
298-
# ~/.config/commit-checker/config.yml — 简单的全局配置示例
299-
comment_language:
300-
locale: zh
298+
# 全局配置示例
299+
# macOS: ~/Library/Application Support/commit-checker/config.yml
300+
# Linux: ~/.config/commit-checker/config.yml
301301
commit_message:
302302
no_ai_coauthor: true
303-
locale: zh
303+
no_unicode_spaces: true
304+
no_ambiguous_chars: true
305+
no_bad_runes: true
306+
no_emoji: true
307+
locale: ko
308+
309+
conventional_commit:
310+
enabled: true
311+
locale: en
312+
313+
language_check:
314+
enabled: true
315+
locale: ko
304316
```
305317

318+
- 如需显式固定全局配置文件位置,可使用 `COMMIT_CHECKER_GLOBAL_CONFIG`。
319+
- 在 macOS 上,`os.UserConfigDir()` 会解析到 `~/Library/Application Support/commit-checker/config.yml`,这是默认的全局配置位置。
320+
- 这个示例同时开启了 AI co-author 删除、Unicode 空白、易混淆字符、坏 UTF-8、emoji 禁止;Conventional Commits 仅允许英文 type,正文语言检查使用韩语。
321+
306322
### 按目录的策略(gitdir include)
307323

308324
支持与 git 的 `[includeIf "gitdir:..."]` 对应的条件 include。

0 commit comments

Comments
 (0)