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

fix: invalid JSON formatting #490

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

raxhvl
Copy link
Contributor

@raxhvl raxhvl commented Aug 17, 2023

The JSON.parse() function converts the string to JavaScript object:

[
  {
    line: 10,
    column: 9,
    severity: 'Warning',
    message: 'Variable "x" is unused',
    ruleId: 'no-unused-vars',
    fix: null,
    filePath: 'src/Boolean.sol'
  },
  { conclusion: '1 problem/s (1 warning/s)' }
] 

instead of standard JSON:

[
    {
        "line": 10,
        "column": 9,
        "severity": "Warning",
        "message": 'Variable "x" is unused',
        "ruleId": "no-unused-vars",
        "fix": None,
        "filePath": "src/types/Boolean.sol"
    },
    { "conclusion": "1 problem/s (1 warning/s)" }
]

This prevents JSON parsing of the generated output.

@dbale-altoros
Copy link
Collaborator

@ravindranrahul this is GREAT!
I totally missed that
I will be merging this today and put it in next version tomorrow

THANKS A LOT!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants