{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "title": "Result",
    "description": "Represents the result of running CFLint",
    "type": "object",
    "properties": {
        "version": {
            "title": "Version",
            "description": "The version of CFLint that products these results",
            "type": "string"
        },
        "timestamp": {
            "title": "Timestamp",
            "description": "A timestamp representing the Unix epoch time when these results were generated",
            "type": "number"
        },
        "issues": {
            "title": "Issues",
            "description": "A list of issues reported by CFLint",
            "type": "array",
            "items": {
                "title": "Issue",
                "description": "Represents each issue found",
                "type": "object",
                "properties": {
                    "severity": {
                        "title": "Severity",
                        "description": "The severity level of the issue",
                        "type": "string",
                        "enum": [
                            "FATAL",
                            "CRITICAL",
                            "ERROR",
                            "WARNING",
                            "CAUTION",
                            "INFO",
                            "COSMETIC"
                        ]
                    },
                    "id": {
                        "title": "ID",
                        "description": "Unique identifier of the rule used to find the issue",
                        "type": "string"
                    },
                    "message": {
                        "title": "Message",
                        "description": "Same as ID",
                        "type": "string"
                    },
                    "category": {
                        "title": "Category",
                        "description": "Currently always contains CFLINT",
                        "type": "string",
                        "default": "CFLINT"
                    },
                    "abbrev": {
                        "title": "Abbreviation",
                        "description": "An abbreviation of the rule used to find the issue",
                        "type": "string"
                    },
                    "locations": {
                        "title": "Locations",
                        "description": "A list of locations that the issue occurs",
                        "type": "array",
                        "items": {
                            "title": "Location",
                            "description": "Properties of the individual issue reported",
                            "type": "object",
                            "properties": {
                                "file": {
                                    "title": "File",
                                    "description": "Full file path to the file in which the issue was found",
                                    "type": "string"
                                },
                                "fileName": {
                                    "title": "File name",
                                    "description": "Just the file name in which the issue was found",
                                    "type": "string"
                                },
                                "function": {
                                    "title": "Function",
                                    "description": "The function in which or for which the issue was found",
                                    "type": "string"
                                },
                                "column": {
                                    "title": "Column",
                                    "description": "The column number of the starting position at which the issue was found",
                                    "type": "number"
                                },
                                "line": {
                                    "title": "Line",
                                    "description": "The line number of the starting position at which the issue was found",
                                    "type": "number"
                                },
                                "message": {
                                    "title": "Message",
                                    "description": "A message describing this specific issue",
                                    "type": "string"
                                },
                                "variable": {
                                    "title": "Variable",
                                    "description": "The variable name for which the issue was found",
                                    "type": "string"
                                },
                                "expression": {
                                    "title": "Expression",
                                    "description": "The expression in which the issue was found",
                                    "type": "string"
                                }
                            },
                            "required": [
                                "file",
                                "fileName",
                                "function",
                                "column",
                                "line",
                                "message",
                                "variable",
                                "expression"
                            ]
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "severity",
                    "id",
                    "message",
                    "category",
                    "abbrev",
                    "locations"
                ]
            },
            "default": []
        },
        "counts": {
            "title": "Counts",
            "description": "Provides counts for the results of running CFLint",
            "type": "object",
            "properties": {
                "totalFiles": {
                    "title": "Total Files",
                    "description": "The total number of files read during this scan",
                    "type": "number",
                    "default": 0
                },
                "totalLines": {
                    "title": "Total Lines",
                    "description": "The total number of lines of code scanned",
                    "type": "number",
                    "default": 0
                },
                "countByCode": {
                    "title": "Count by Code",
                    "description": "List of issue codes with their respective issue counts",
                    "type": "array",
                    "items": {
                        "title": "Code Count",
                        "description": "The count of issues found for each distinct issue code",
                        "type": "object",
                        "properties": {
                            "code": {
                                "title": "Current Code",
                                "description": "The current issue code being counted",
                                "type": "string"
                            },
                            "count": {
                                "title": "Current Count",
                                "description": "The issue count for the current issue code",
                                "type": "number"
                            }
                        },
                        "required": [
                            "code",
                            "count"
                        ]
                    },
                    "default": []
                },
                "countBySeverity": {
                    "title": "Count by Severity",
                    "description": "List of issue severities with their respective issue counts",
                    "type": "array",
                    "items": {
                        "title": "Severity Count",
                        "description": "The count of issues found for each distinct issue severity",
                        "type": "object",
                        "properties": {
                            "severity": {
                                "title": "Current Severity",
                                "description": "The current issue severity being counted",
                                "type": "string"
                            },
                            "count": {
                                "title": "Current Count",
                                "description": "The issue count for the current severity",
                                "type": "number"
                            }
                        },
                        "required": [
                            "severity",
                            "count"
                        ]
                    },
                    "default": []
                }
            },
            "required": [
                "totalFiles",
                "totalLines",
                "countByCode",
                "countBySeverity"
            ]
        }
    },
    "required": [
        "version",
        "timestamp",
        "issues",
        "counts"
    ]
}