(Bug) Halstead Metrics and Ops Output are inconsistent to each other
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 469
- Forks
- 74
- Merge moyen
- 17 h 16 min
- PR mergées (30 j)
- 10
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de mozilla/rust-code-analysis
-
mozcpp: refresh the list of Mozilla annotation macrosPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
mozilla/rust-code-analysis#1267 ·
Les mainteneurs répondent en général sous 1 jour
-
mozcpp: parse a string literal followed by a PRI*/SCN* format macroPeut-être pris @marco-c l’a pris il y a 2 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
mozilla/rust-code-analysis#1266 ·
Les mainteneurs répondent en général sous 1 jour
-
Grammar check tasks compare unrelated files and skip most of the othersPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
mozilla/rust-code-analysis#1261 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
mozilla/rust-code-analysis#1250 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
mozilla/rust-code-analysis#1249 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de mozilla/rust-code-analysis
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
ubugeeei-prod/vize#13586 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
storytold/photocraft#16565 ·
Les mainteneurs répondent en général sous 1 jour
-
flaky needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
bherbruck/solvecraft#21315 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
undergroundrap/hatchling#624 ·
Les mainteneurs répondent en général sous 1 jour
-
node:url: url.parse and url.resolve report name parse/resolve instead of Node's urlParse/urlResolveOuvertearea:stdlib effort:S impact:low parity type:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour