docs: fix cp -r flatten install instructions that silently overwrite rules

The configure-ecc skill (English source) and ja-JP top-level README plus
its configure-ecc translation documented `cp -r .../<lang>/* <target>/rules/`
for installing rule directories. rules/README.md explicitly warns against
this form because:

- Common and language-specific directories contain same-named files
  (coding-style.md, testing.md, patterns.md, hooks.md, security.md).
  Flattening makes each language overwrite the previous and common.
- The relative `../common/<file>.md` references in language rule files
  break when common/ is no longer a sibling directory.

This is silent — the user gets only the last language's rules with no
error message.

Replace with the directory-form copy already documented in
rules/README.md:

    cp -r .../<lang> <target>/rules/<lang>

Scope: English source + ja-JP. Closes #1879. Other locale translations
(zh-CN, ko-KR, pt-BR, tr) carry the same pattern and can follow up as
separate PRs to keep this change reviewable.
This commit is contained in:
zomia
2026-05-14 08:40:36 +09:00
parent 20f00c1410
commit 4d3033eb64
3 changed files with 26 additions and 26 deletions
+6 -6
View File
@@ -169,13 +169,13 @@ Options:
インストールを実行:
```bash
# 共通ルールrules/ にフラットコピー)
cp -r $ECC_ROOT/rules/common/* $TARGET/rules/
# 共通ルール
cp -r $ECC_ROOT/rules/common $TARGET/rules/common
# 言語固有のルール(rules/ にフラットコピー
cp -r $ECC_ROOT/rules/typescript/* $TARGET/rules/ # 選択された場合
cp -r $ECC_ROOT/rules/python/* $TARGET/rules/ # 選択された場合
cp -r $ECC_ROOT/rules/golang/* $TARGET/rules/ # 選択された場合
# 言語固有のルール(言語別ディレクトリを保持
cp -r $ECC_ROOT/rules/typescript $TARGET/rules/typescript # 選択された場合
cp -r $ECC_ROOT/rules/python $TARGET/rules/python # 選択された場合
cp -r $ECC_ROOT/rules/golang $TARGET/rules/golang # 選択された場合
```
**重要**: ユーザーが言語固有のルールを選択したが、共通ルールを選択しなかった場合、警告します: