rusty icon indicating copy to clipboard operation
rusty copied to clipboard

Sort error codes within their categories when printing with `plc config diagnostics`

Open mhasel opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. Currently, if you want to see the error severity configuration and print it via plc config diagnostics, the error codes will be in a random order within their respective severity. If you then write the output to a json file, it will look something like this:

{
    "warning": [
        "E013",
        "E022",
        "E047",
        "E014",
        "E015",
        "E090",
        "E004",
        "E042",
        "E023",
        "E049",
        "E091",
        "E039",
        "E093",
        "E024",
        "E016"
    ],

    ...
}

Describe the solution you'd like Sort the error codes in their categories ascendingly, to make it easier to find the codes you are looking for.

mhasel avatar Mar 15 '24 08:03 mhasel

In addittion, we should use the json pretty_print or to_string_pretty method here so that the json is pormatted without needing to pipe it to a formatter.

ghaith avatar Mar 15 '24 08:03 ghaith