Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix(performance): match complexity-share registry globs per path segment, not with fnmatch

クローズ
#6,983 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #7080 @kyle-sexton による — マージ済み

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

Start with registry_key and the fnmatchcase call in scripts/js-complexity-share.py (around lines 72-74), which exist only on the PR #6806 branch, not main. Compare them with the pathglob matcher in plugins/code-metrics/skills/audit-duplication/scripts/registry-filter.py. Done means a member glob like plugins/*/hooks/x.js no longer matches nested paths, both tools agree on the same registry file, and a test covers a nested path that must not match.

索引モデルが issue の本文から書いたものです。

説明

needs-human needs-triage

Summary

scripts/js-complexity-share.py, added by PR #6806 (not yet on main; the evidence below is pinned to that branch), matches registry cluster members with fnmatch.fnmatchcase. In fnmatch, * matches any characters including /, so a member glob such as plugins/*/hooks/x.js also matches nested paths, and a registry line can sanction more files than it names. The sibling registry reader in the code-metrics plugin uses the gitignore-style pathglob matcher, where * does not cross /.

Failure scenario

Expected: a cluster member glob matches the same set of files here as it does in registry-filter.py, so both tools agree on what counts as a sanctioned copy.

Actual: a member glob with * matches deeper paths here. Files that the registry does not intend to sanction collapse into the cluster and are counted once, which lowers the measured share and loosens the ratchet. The two tools can also disagree on the same registry file.

Evidence

Pinned to the head of PR #6806, branch js-complexity-share-ratchet, commit 108b03fb37d24ca04ea8d6d5d1527b0a596f8531:

Suggested fix

Reuse pathglob.matches from the code-metrics plugin, or implement segment-aware matching, so * stops at / and ** is explicit. Add a test with a member glob and a nested path that must not match.

Related

  • PR #6806

🤖 Generated with Claude Code

主要言語
Shell
スター
22
フォーク
2
平均マージ
8時間 24分
マージ済み PR(30日)
947

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

melodic-software/claude-code-plugins のほかの issue

melodic-software/claude-code-plugins の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。