Skip to content

json schema for errored does not parallel that of passing and failing #1138

@sei-shissam

Description

@sei-shissam

Describe the bug
There is no name key for errored as there is for passing and failing

When parsing the resulting json from a hc check analyzing those analyzes that pass, fail, and error are not similar.

To Reproduce

  • Get the results for a hc check and save those results to a file

hc --format json check https://github.com/mitre/hipcheck > sample.json

  • Now observe queries of that json result
$ jq -r '.passing[]|.name' sample.json
mitre/activity
mitre/entropy
mitre/churn
mitre/identity
mitre/binary
$ jq -r '.failing[]|.name' sample.json
mitre/fuzz
mitre/review
mitre/affiliation
$ jq -r '.errored[]|.name' sample.json
null
  • observe that null for errored is incorrect in this case as there is no key name in the errored structure

  • observe that the name of the errored analysis is in the key analysis

$ jq -r '.errored[]|.analysis' sample.json
mitre/typo

Expected behavior
the errored analyzes would follow the same pattern for the others (i.e., passing and failing)

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Operating System: [e.g. macOS] Ubuntu 22.04
  • Hipcheck Version [e.g. 3.6.0] 3.13.0

Additional context
As an aside, the key analysis for those three structures do not appear distinct in any manner and now sure if this is intended or not (perhaps for future use).

$ jq -r '.errored[]|.analysis' sample.json
mitre/typo
$ jq -r '.failing[]|.analysis' sample.json
Analysis
Analysis
Analysis
$ jq -r '.passing[]|.analysis' sample.json
Analysis
Analysis
Analysis
Analysis
Analysis

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions