From time to time, we may change CodeCheck IDs. This allows us to make our tool more consistent and improve sorting. However, this may make it inconvenient for some users. We have provided a script to update IDs in your files.


For example, you may have a CodeCheck JSON file that looks like this.


{
    "automatic": true,
    "checks": [
        "CPP_W_SUGGEST_OVERRIDE",
        "CPP_W002"
    ],
    "excludes": [
    ],
    "name": "config",
    "parents": [
    ]
}


Run it through the script to get the following result.


{
    "automatic": true,
    "checks": [
        "CPP_WARN_SUGGEST_OVERRIDE",
        "CPP_WARN_IMPLICIT_INT_CONVERSION", "CPP_WARN_SHORTEN_64_TO_32"
    ],
    "excludes": [
    ],
    "name": "config",
    "parents": [
    ]
}


Currently, JSON files are supported.


The script is attached below and the CSV spreadsheet can be downloaded. To run the script, just use this command:


python id.py /path/to/my/file.json /path/to/other/file.json