(Bug) Halstead Metrics and Ops Output are inconsistent to each other
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by tracing how the CLI produces Halstead n1 values and the --ops output for function and module scopes, then compare the C and Rust results described in the issue. Check how operators such as uint8_t, u8, and else are collected at each scope; done means the operator lists and n1 values agree consistently across both languages and scopes.
索引モデルが issue の本文から書いたものです。
説明
I'm currently using the CLI variant to analyze C and Rust code. However, I spotted, that n1 in the Halstead metrics is not corresponding to the operations list generated by the --ops output.
To my understanding the length of the list of operators should correspond with the n1 value in Halstead. This is however using this tool not always the case; neither in a function space nor on the module level.
In our current setup, we actually have on a global space a difference by 4 operators and for multiple functions a difference of 1.
Furthermore, I spotted, that in the list of operators, if one calculates the union of all sets of all operators of all function - spaces, it misses some in the module space. (In my case the 'uint8_t' was used in a function, but is missing from the module space in case of my C analysis. Comparing it to the Rust Version, u8 is present on the module space and on the function space; However, in Rust 'else' is missing from the operator list in the module space, but is present in the function space; Comparing this to the C analysis, 'else' is present there in the module space and in the function space)
Since this bug in my opinion effects the Halstead metrics fundamentally, I wanted to check with you if this bug is known and if there is a fix available.
- 主要言語
- Rust
- スター
- 469
- フォーク
- 74
- 平均マージ
- 17時間 16分
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mozilla/rust-code-analysis のほかの issue
-
mozcpp: refresh the list of Mozilla annotation macros対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
mozilla/rust-code-analysis#1267 ·
メンテナーはふだん 1 日以内に返信
-
mozcpp: parse a string literal followed by a PRI*/SCN* format macro対応中かも @marco-c が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
mozilla/rust-code-analysis#1266 ·
メンテナーはふだん 1 日以内に返信
-
Grammar check tasks compare unrelated files and skip most of the others再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
mozilla/rust-code-analysis#1261 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
mozilla/rust-code-analysis#1250 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
mozilla/rust-code-analysis#1249 ·
メンテナーはふだん 1 日以内に返信
mozilla/rust-code-analysis の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ubugeeei-prod/vize#13586 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
storytold/photocraft#16565 ·
メンテナーはふだん 1 日以内に返信
-
flaky needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
bherbruck/solvecraft#21315 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
undergroundrap/hatchling#624 ·
メンテナーはふだん 1 日以内に返信
-
node:url: url.parse and url.resolve report name parse/resolve instead of Node's urlParse/urlResolveオープンarea:stdlib effort:S impact:low parity type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信