Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add json flag for check command #1021

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Riley-Kilgore
Copy link
Member

Running aiken check --json will not print warnings; Compilation Errors will print as normal and cause json to not be provided as output; assertion message needs work.

Example output:

{
  "seed": 2661348879,
  "modules": [
    {
      "name": "common/utils",
      "tests": [
        {
          "name": "test_always_fail",
          "status": "FAIL",
          "execution_units": {
            "memory": 200,
            "cpu": 16100
          },
          "assertion": {
            "message": "\u001b[1m\u001b[31m× expected\u001b[39m\u001b[0m\n\u001b[31m│\u001b[39m 2\n\u001b[1m\u001b[31m× to equal\u001b[39m\u001b[0m\n\u001b[31m│\u001b[39m 1",
            "expected_to_fail": false
          }
        },
        {
          "name": "test_always_succeed",
          "status": "PASS",
          "execution_units": {
            "memory": 200,
            "cpu": 16100
          }
        }
      ],
      "summary": {
        "total": 2,
        "passed": 1,
        "failed": 1
      }
    }
  ],
  "summary": {
    "total_tests": 2,
    "passed_tests": 1,
    "failed_tests": 1,
    "module_count": 1,
    "max_execution_units": {
      "memory": 3,
      "cpu": 5
    },
    "max_iterations": 1,
    "modules": [
      {
        "name": "common/utils",
        "tests": [
          {
            "name": "test_always_fail",
            "status": "FAIL",
            "execution_units": {
              "memory": 200,
              "cpu": 16100
            },
            "assertion": {
              "message": "\u001b[1m\u001b[31m× expected\u001b[39m\u001b[0m\n\u001b[31m│\u001b[39m 2\n\u001b[1m\u001b[31m× to equal\u001b[39m\u001b[0m\n\u001b[31m│\u001b[39m 1",
              "expected_to_fail": false
            }
          },
          {
            "name": "test_always_succeed",
            "status": "PASS",
            "execution_units": {
              "memory": 200,
              "cpu": 16100
            }
          }
        ],
        "summary": {
          "total": 2,
          "passed": 1,
          "failed": 1
        }
      }
    ]
  }
}

@Riley-Kilgore Riley-Kilgore requested a review from a team as a code owner September 16, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant