diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 5b7cfd8..16e2b7f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -19,6 +19,16 @@ jobs: - name: install meson run: pip install meson + - name: Check file line limits + run: | + for file in $(find src/ -name "*.cpp" -o -name "*.hpp"); do + lines=$(wc -l < "$file") + if [ "$lines" -gt 200 ]; then + echo "ERROR: $file has $lines lines (limit: 200)" + exit 1 + fi + done + - name: Cache vcpkg packages id: cache-vcpkg uses: actions/cache@v4 diff --git a/docs/CODING_CONVENTIONS.md b/docs/CODING_CONVENTIONS.md index b7a74b7..000f405 100644 --- a/docs/CODING_CONVENTIONS.md +++ b/docs/CODING_CONVENTIONS.md @@ -24,6 +24,10 @@ 原則1行最大120文字。 タブ文字のせいで一見すると120文字を超えていることもあるが、面倒臭いので無視。 +## 200 Row + +必ず1ファイル最大200行。 + ## auto `auto`が使えるなら使う。