{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "$id": "https://pvs-studio.com/log_pvs-studio-cmd_v1.schema.json",
  "title": "Structured log produced by the PVS-Studio_Cmd utility",
  "type": "object",
  "required": [
    "basicPerformance",
    "configuration",
    "environment",
    "input",
    "output",
    "projects",
    "pvsDiagVersion",
    "runs",
    "toolchains",
    "utility"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "description": "URI of the JSON Schema used to validate this document."
    },
    "basicPerformance": {
      "$ref": "#/definitions/basicPerformance",
      "description": "Basic performance metrics."
    },
    "configuration": {
      "$ref": "#/definitions/rootConfiguration",
      "description": "Solution-level analysis configuration."
    },
    "environment": {
      "$ref": "#/definitions/hostEnvironment",
      "description": "Information about the host environment where the utility was run."
    },
    "input": {
      "$ref": "#/definitions/input",
      "description": "Utility input parameters, both explicit and implicit."
    },
    "output": {
      "$ref": "#/definitions/output",
      "description": "Utility execution results."
    },
    "projects": {
      "$ref": "#/definitions/projects",
      "description": "Projects included in the analysis."
    },
    "pvsDiagVersion": {
      "type": "integer",
      "minimum": 1,
      "description": "Indicates that this document is a log produced by a PVS-Studio tool and specifies the diagnostic format version."
    },
    "runs": {
      "$ref": "#/definitions/runs",
      "description": "Grouped utility runs performed as part of the analysis."
    },
    "toolchains": {
      "type": "array",
      "description": "Detected toolchains used during analysis.",
      "items": {
        "oneOf": [
          { "$ref": "#/definitions/dotnetToolchain" },
          { "$ref": "#/definitions/compilerToolchain" }
        ]
      }
    },
    "utility": {
      "$ref": "#/definitions/utility",
      "description": "Information about the utility that produced the log."
    }
  },
  "additionalProperties": false,
  "definitions": {
    "uuid": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
      "description": "UUID string."
    },
    "timepoint": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp in ISO 8601 date-time format."
    },
    "durationNS": {
      "type": "integer",
      "minimum": 0,
      "description": "Duration in nanoseconds."
    },
    "durationHMS": {
      "type": "string",
      "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$",
      "description": "Human-readable duration formatted as hh:mm:ss or hh:mm:ss.fraction."
    },
    "memorySize": {
      "type": "integer",
      "minimum": 0,
      "description": "Memory size."
    },
    "stringArray": {
      "type": "array",
      "description": "Array of strings.",
      "items": {
        "type": "string"
      }
    },
    "stringMap": {
      "type": "object",
      "description": "Map of string keys to string values.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "artifactMap": {
      "type": "object",
      "description": "Map of artifact names to file paths.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "categories": {
      "type": "object",
      "description": "Enabled or disabled warning categories.",
      "required": [
        "cpp_autosar",
        "cpp_cs",
        "cpp_ga",
        "cpp_misra",
        "cpp_op",
        "cpp_owasp",
        "cpp_x64",
        "cs_ga",
        "cs_op",
        "cs_owasp"
      ],
      "properties": {
        "cpp_autosar": {
          "type": "boolean",
          "description": "State of the C++ AUTOSAR warning category."
        },
        "cpp_cs": {
          "type": "boolean",
          "description": "State of the C++ Customer-Specific warning category."
        },
        "cpp_ga": {
          "type": "boolean",
          "description": "State of the C++ General warning category."
        },
        "cpp_misra": {
          "type": "boolean",
          "description": "State of the C++ MISRA warning category."
        },
        "cpp_op": {
          "type": "boolean",
          "description": "State of the C++ Optimizations warning category."
        },
        "cpp_owasp": {
          "type": "boolean",
          "description": "State of the C++ OWASP warning category."
        },
        "cpp_x64": {
          "type": "boolean",
          "description": "State of the C++ 64-bit warning category."
        },
        "cs_ga": {
          "type": "boolean",
          "description": "State of the C# General warning category."
        },
        "cs_op": {
          "type": "boolean",
          "description": "State of the C# Optimizations warning category."
        },
        "cs_owasp": {
          "type": "boolean",
          "description": "State of the C# OWASP warning category."
        }
      },
      "additionalProperties": false
    },
    "misra": {
      "type": "object",
      "description": "MISRA settings.",
      "required": [
        "cVersion",
        "cppVersion"
      ],
      "properties": {
        "cVersion": {
          "type": "string",
          "description": "MISRA C version used for analysis."
        },
        "cppVersion": {
          "type": "string",
          "description": "MISRA C++ version used for analysis."
        }
      },
      "additionalProperties": false
    },
    "ruleConfig": {
      "type": "object",
      "description": "Diagnostic rule configuration file entry.",
      "required": [
        "filePath",
        "priority"
      ],
      "properties": {
        "filePath": {
          "type": "string",
          "description": "Path to the rule configuration file."
        },
        "priority": {
          "type": "integer",
          "description": "Priority of the configuration file."
        }
      },
      "additionalProperties": false
    },
    "targetEntry": {
      "type": "object",
      "description": "Analysis target settings.",
      "required": [
        "configuration",
        "path",
        "platform"
      ],
      "properties": {
        "configuration": {
          "type": "string",
          "description": "Build configuration used for the analysis run."
        },
        "path": {
          "type": "string",
          "description": "Path to the analyzed target file, such as a solution or project."
        },
        "platform": {
          "type": "string",
          "description": "Target platform used for the analysis run."
        }
      },
      "additionalProperties": false
    },
    "pathSettings": {
      "type": "object",
      "description": "Path-related analysis settings.",
      "required": [
        "excluded",
        "included",
        "isolatedDirs",
        "skipAnalysisFrom",
        "skipSettingsFrom"
      ],
      "properties": {
        "excluded": {
          "$ref": "#/definitions/stringArray",
          "description": "List of paths excluded from analysis."
        },
        "included": {
          "$ref": "#/definitions/stringArray",
          "description": "List of paths explicitly included in analysis."
        },
        "isolatedDirs": {
          "$ref": "#/definitions/stringArray",
          "description": "List of isolated directories."
        },
        "skipAnalysisFrom": {
          "$ref": "#/definitions/stringArray",
          "description": "Paths for which analyzer warnings are ignored."
        },
        "skipSettingsFrom": {
          "$ref": "#/definitions/stringArray",
          "description": "Paths from which analyzer settings are ignored."
        }
      },
      "additionalProperties": false
    },
    "logging": {
      "type": "object",
      "description": "Logging settings.",
      "required": [
        "categories",
        "options",
        "sourceLog"
      ],
      "properties": {
        "categories": {
          "$ref": "#/definitions/stringArray",
          "description": "Enabled logging categories."
        },
        "options": {
          "$ref": "#/definitions/stringArray",
          "description": "Enabled logging options."
        },
        "sourceLog": {
          "type": "string",
          "description": "Path to the raw log file from which this structured log was produced."
        }
      },
      "additionalProperties": false
    },
    "basicPerformance": {
      "type": "object",
      "description": "Basic performance metrics.",
      "required": [
        "elapsedTime",
        "elapsedTimeISO",
        "peakMemoryConsumption",
        "peakMemoryConsumptionMiB"
      ],
      "properties": {
        "elapsedTime": {
          "$ref": "#/definitions/durationNS",
          "description": "Execution time in nanoseconds."
        },
        "elapsedTimeISO": {
          "$ref": "#/definitions/durationHMS",
          "description": "Human-readable execution time."
        },
        "peakMemoryConsumption": {
          "$ref": "#/definitions/memorySize",
          "description": "Peak memory consumption in bytes."
        },
        "peakMemoryConsumptionMiB": {
          "$ref": "#/definitions/memorySize",
          "description": "Peak memory consumption in MiB."
        }
      },
      "additionalProperties": false
    },
    "hostEnvironment": {
      "type": "object",
      "description": "Information about the host environment where the utility was run.",
      "required": [
        "availableRam",
        "availableRamMiB",
        "os",
        "osVersion",
        "physicalRam",
        "physicalRamMiB",
        "platform",
        "totalRam",
        "totalRamMiB",
        "variables"
      ],
      "properties": {
        "availableRam": {
          "$ref": "#/definitions/memorySize",
          "description": "Amount of available RAM at startup, in bytes."
        },
        "availableRamMiB": {
          "$ref": "#/definitions/memorySize",
          "description": "Amount of available RAM at startup, in MiB."
        },
        "os": {
          "type": "string",
          "description": "Operating system name."
        },
        "osVersion": {
          "type": "string",
          "description": "Operating system version."
        },
        "physicalRam": {
          "$ref": "#/definitions/memorySize",
          "description": "Amount of physical memory, in bytes."
        },
        "physicalRamMiB": {
          "$ref": "#/definitions/memorySize",
          "description": "Amount of physical memory, in MiB."
        },
        "platform": {
          "type": "string",
          "description": "Host platform."
        },
        "totalRam": {
          "$ref": "#/definitions/memorySize",
          "description": "Total amount of RAM, in bytes."
        },
        "totalRamMiB": {
          "$ref": "#/definitions/memorySize",
          "description": "Total amount of RAM, in MiB."
        },
        "variables": {
          "$ref": "#/definitions/stringMap",
          "description": "Environment variables."
        }
      },
      "additionalProperties": false
    },
    "defines": {
      "type": "object",
      "description": "Symbol definition settings used for C# analysis.",
      "required": [
        "appended",
        "excluded"
      ],
      "properties": {
        "appended": {
          "$ref": "#/definitions/stringArray",
          "description": "List of symbols added for project analysis."
        },
        "excluded": {
          "$ref": "#/definitions/stringArray",
          "description": "List of symbols excluded from project analysis."
        }
      },
      "additionalProperties": false
    },
    "dependencyCache": {
      "type": "object",
      "description": "Compilation dependency cache settings.",
      "required": [
        "path",
        "sourcesRoot",
        "trackingMode"
      ],
      "properties": {
        "path": {
          "type": "string",
          "description": "Path to the directory where dependency cache files are stored."
        },
        "sourcesRoot": {
          "type": "string",
          "description": "Path used as the source root for building relative paths in the compilation dependency cache."
        },
        "trackingMode": {
          "type": "string",
          "description": "Source file tracking mode used by the compilation dependency cache."
        }
      },
      "additionalProperties": false
    },
    "solutionDirSettings": {
      "type": "object",
      "description": "Settings related to using the solution directory.",
      "required": [
        "useAsDepCacheSourceTreeRoot",
        "useAsInitial",
        "useAsSourceTreeRoot"
      ],
      "properties": {
        "useAsDepCacheSourceTreeRoot": {
          "type": "boolean",
          "description": "Whether to use the solution directory as the source root for the dependency cache."
        },
        "useAsInitial": {
          "type": "boolean",
          "description": "Whether to suggest saving the report file in the same directory as the solution file."
        },
        "useAsSourceTreeRoot": {
          "type": "boolean",
          "description": "Whether to use the directory containing the solution file as the Source Tree Root."
        }
      },
      "additionalProperties": false
    },
    "projectSelection": {
      "type": "object",
      "description": "Settings that control which projects are included in analysis.",
      "required": [
        "excluded",
        "included"
      ],
      "properties": {
        "excluded": {
          "$ref": "#/definitions/stringArray",
          "description": "List of solution projects excluded from analysis."
        },
        "included": {
          "$ref": "#/definitions/stringArray",
          "description": "List of solution projects included in analysis."
        }
      },
      "additionalProperties": false
    },
    "rootConfiguration": {
      "type": "object",
      "description": "Effective solution-level analyzer configuration.",
      "required": [
        "analysisTimeout",
        "analyzeModifiedFiles",
        "annotations",
        "autoSettingsImport",
        "categories",
        "createBinaryLogs",
        "defines",
        "dependencyCache",
        "disableIncrementalPCHTracking",
        "disableTemplateInstantiationCpp",
        "disabledRules",
        "filteredOutMessagesSavingMode",
        "hashOnlyMode",
        "ignoreGlobalSettings",
        "ignoreSolutionDirectoryAsSourceTreeRoot",
        "incrementalAnalysisMode",
        "incrementalAnalysisTimeout",
        "intermodularAnalysisCpp",
        "licFilePath",
        "misra",
        "msBuildProperties",
        "noNoise",
        "pathSettings",
        "performPreBuildStep",
        "performTFVCCheckout",
        "projects",
        "ruleConfigs",
        "securityRelatedIssues",
        "solutionDir",
        "sonarQubeMode",
        "suppressFiles",
        "suppressParsingError",
        "synchronizeSuppressFiles",
        "targets",
        "threads",
        "useOldCppParser"
      ],
      "properties": {
        "analysisTimeout": {
          "type": "integer",
          "minimum": 0,
          "description": "Analysis timeout in seconds. A value of 0 means no limit."
        },
        "analyzeModifiedFiles": {
          "type": "boolean",
          "description": "Whether to perform incremental analysis of modified files."
        },
        "annotations": {
          "$ref": "#/definitions/stringArray",
          "description": "List of JSON annotation files."
        },
        "autoSettingsImport": {
          "type": "boolean",
          "description": "Whether to automatically import additional settings files from %appdata%/SettingsImports."
        },
        "categories": {
          "$ref": "#/definitions/categories",
          "description": "Warning category states."
        },
        "createBinaryLogs": {
          "type": "boolean",
          "description": "Whether to create binary logs."
        },
        "defines": {
          "$ref": "#/definitions/defines",
          "description": "Symbol definition settings."
        },
        "dependencyCache": {
          "$ref": "#/definitions/dependencyCache",
          "description": "Compilation dependency cache settings."
        },
        "disableIncrementalPCHTracking": {
          "type": "boolean",
          "description": "Whether to disable change tracking for headers specified in the PCH during incremental analysis."
        },
        "disableTemplateInstantiationCpp": {
          "type": "boolean",
          "description": "Whether to disable template instantiation in the C and C++ analyzer."
        },
        "disabledRules": {
          "$ref": "#/definitions/stringArray",
          "description": "List of disabled diagnostic rules."
        },
        "filteredOutMessagesSavingMode": {
          "type": "string",
          "description": "Mode used to save additional reports based on filtered warnings."
        },
        "hashOnlyMode": {
          "type": "string",
          "description": "Mode that controls whether only hash-based suppression comments are used."
        },
        "ignoreGlobalSettings": {
          "type": "boolean",
          "description": "Whether to ignore global settings, such as Settings.xml in %appdata%."
        },
        "ignoreSolutionDirectoryAsSourceTreeRoot": {
          "type": "boolean",
          "description": "Whether to ignore the UseSolutionDirAsSourceTreeRoot option."
        },
        "incrementalAnalysisMode": {
          "type": "string",
          "description": "Incremental analysis mode."
        },
        "incrementalAnalysisTimeout": {
          "type": "integer",
          "minimum": 0,
          "description": "Incremental analysis timeout in seconds. A value of 0 means no limit."
        },
        "intermodularAnalysisCpp": {
          "type": "boolean",
          "description": "Whether C++ intermodular analysis is enabled."
        },
        "licFilePath": {
          "type": "string",
          "description": "Path to the license file in use."
        },
        "misra": {
          "$ref": "#/definitions/misra",
          "description": "MISRA settings."
        },
        "msBuildProperties": {
          "$ref": "#/definitions/stringArray",
          "description": "MSBuild properties added or overridden for the analysis run."
        },
        "noNoise": {
          "type": "boolean",
          "description": "Whether to disable level 3 warnings."
        },
        "pathSettings": {
          "$ref": "#/definitions/pathSettings",
          "description": "Path-related settings."
        },
        "performPreBuildStep": {
          "type": "boolean",
          "description": "Whether to execute the Custom Build Step actions from the Visual Studio project file before analysis."
        },
        "performTFVCCheckout": {
          "type": "boolean",
          "description": "Whether to automatically perform checkout using Team Foundation Version Control Tool when editing files containing suppressed analyzer warnings."
        },
        "projects": {
          "$ref": "#/definitions/projectSelection",
          "description": "Project inclusion and exclusion settings."
        },
        "ruleConfigs": {
          "type": "array",
          "description": "List of diagnostic configuration files.",
          "items": { "$ref": "#/definitions/ruleConfig" }
        },
        "securityRelatedIssues": {
          "type": "boolean",
          "description": "Whether to include GOST SAST identifiers."
        },
        "solutionDir": {
          "$ref": "#/definitions/solutionDirSettings",
          "description": "Solution directory settings."
        },
        "sonarQubeMode": {
          "type": "boolean",
          "description": "Whether to create a sonar.properties file for SonarQube upload."
        },
        "suppressFiles": {
          "$ref": "#/definitions/stringArray",
          "description": "Paths to suppression files."
        },
        "suppressParsingError": {
          "type": "boolean",
          "description": "Whether to suppress parsing errors such as V001 and V051."
        },
        "synchronizeSuppressFiles": {
          "type": "boolean",
          "description": "Whether to synchronize suppression files."
        },
        "targets": {
          "type": "array",
          "description": "Settings of analyzed targets.",
          "items": { "$ref": "#/definitions/targetEntry" }
        },
        "threads": {
          "type": "integer",
          "minimum": 1,
          "description": "Actual number of execution threads used."
        },
        "useOldCppParser": {
          "type": "boolean",
          "description": "Whether to use the legacy C++ parser."
        }
      },
      "additionalProperties": true
    },
    "projectConfiguration": {
      "type": "object",
      "description": "Effective configuration applied to a specific project.",
      "required": [
        "analysisTimeout",
        "annotations",
        "categories",
        "createBinaryLogs",
        "disableTemplateInstantiationCpp",
        "disabledRules",
        "incrementalAnalysisMode",
        "misra",
        "pathSettings",
        "ruleConfigs",
        "securityRelatedIssues",
        "suppressFiles",
        "suppressParsingError",
        "targets",
        "useOldCppParser"
      ],
      "properties": {
        "analysisTimeout": {
          "type": "integer",
          "minimum": 0,
          "description": "Analysis timeout in seconds. A value of 0 means no limit."
        },
        "annotations": {
          "$ref": "#/definitions/stringArray",
          "description": "List of JSON annotation files."
        },
        "categories": {
          "$ref": "#/definitions/categories",
          "description": "Warning category states."
        },
        "createBinaryLogs": {
          "type": "boolean",
          "description": "Whether to create binary logs."
        },
        "disableTemplateInstantiationCpp": {
          "type": "boolean",
          "description": "Whether to disable template instantiation in the C and C++ analyzer."
        },
        "disabledRules": {
          "$ref": "#/definitions/stringArray",
          "description": "List of disabled diagnostic rules."
        },
        "incrementalAnalysisMode": {
          "type": "string",
          "description": "Incremental analysis mode."
        },
        "misra": {
          "$ref": "#/definitions/misra",
          "description": "MISRA settings."
        },
        "pathSettings": {
          "$ref": "#/definitions/pathSettings",
          "description": "Path-related settings."
        },
        "ruleConfigs": {
          "type": "array",
          "description": "List of diagnostic configuration files.",
          "items": { "$ref": "#/definitions/ruleConfig" }
        },
        "securityRelatedIssues": {
          "type": "boolean",
          "description": "Whether to include security-related SAST identifiers."
        },
        "suppressFiles": {
          "$ref": "#/definitions/stringArray",
          "description": "Paths to suppression files."
        },
        "suppressParsingError": {
          "type": "boolean",
          "description": "Whether to suppress parsing errors such as V001 and V051."
        },
        "targets": {
          "type": "array",
          "description": "Settings of analyzed targets.",
          "items": { "$ref": "#/definitions/targetEntry" }
        },
        "useOldCppParser": {
          "type": "boolean",
          "description": "Whether to use the legacy C++ parser."
        }
      },
      "additionalProperties": true
    },
    "input": {
      "type": "object",
      "description": "Utility input parameters, both explicit and implicit.",
      "required": [
        "arguments",
        "cwd",
        "logging",
        "projectFile",
        "timestamp"
      ],
      "properties": {
        "arguments": {
          "$ref": "#/definitions/stringArray",
          "description": "Command-line arguments passed to the utility."
        },
        "cwd": {
          "type": "string",
          "description": "Current working directory of the process."
        },
        "logging": {
          "$ref": "#/definitions/logging",
          "description": "Logging settings."
        },
        "projectFile": {
          "type": "string",
          "description": "Input file used as the source of data for analysis."
        },
        "timestamp": {
          "$ref": "#/definitions/timepoint",
          "description": "Analyzer start date and time."
        }
      },
      "additionalProperties": false
    },
    "outputArtifacts": {
      "type": "object",
      "description": "Output files produced by the utility.",
      "required": [
        "outputFilePath"
      ],
      "properties": {
        "outputFilePath": {
          "type": "string",
          "description": "Path to the report output file."
        }
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "output": {
      "type": "object",
      "description": "Utility execution results.",
      "required": [
        "anomalies",
        "artifacts",
        "isFailed",
        "returnCode",
        "stderr",
        "stdout"
      ],
      "properties": {
        "anomalies": {
          "$ref": "#/definitions/stringArray",
          "description": "List of anomalies detected based on the log."
        },
        "artifacts": {
          "$ref": "#/definitions/outputArtifacts",
          "description": "Output artifacts produced by the utility."
        },
        "isFailed": {
          "type": "boolean",
          "description": "Indicates whether the utility considered the run failed."
        },
        "returnCode": {
          "$ref": "#/definitions/returnCode",
          "description": "Process exit code returned by the utility."
        },
        "stderr": {
          "$ref": "#/definitions/stringArray",
          "description": "Captured stderr output."
        },
        "stdout": {
          "$ref": "#/definitions/stringArray",
          "description": "Captured stdout output."
        }
      },
      "additionalProperties": false
    },
    "evaluationContext": {
      "type": "object",
      "description": "Project evaluation context.",
      "required": [
        "environment",
        "isSuccess",
        "properties",
        "vsPaths"
      ],
      "properties": {
        "environment": {
          "$ref": "#/definitions/stringMap",
          "description": "Environment variables used during evaluation."
        },
        "isSuccess": {
          "type": "boolean",
          "description": "Whether project evaluation completed successfully."
        },
        "properties": {
          "$ref": "#/definitions/stringMap",
          "description": "MSBuild properties used during evaluation."
        },
        "vsPaths": {
          "$ref": "#/definitions/stringArray",
          "description": "Paths to detected Visual Studio installations."
        }
      },
      "additionalProperties": false
    },
    "fileMap": {
      "type": "object",
      "description": "Map of analyzed file identifiers to file paths.",
      "patternProperties": {
        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "projectEntry": {
      "type": "object",
      "description": "Information about a project included in the analysis.",
      "required": [
        "configuration",
        "evaluationContexts",
        "files",
        "id",
        "projectFile",
        "references"
      ],
      "properties": {
        "configuration": {
          "$ref": "#/definitions/projectConfiguration",
          "description": "Effective configuration applied to the project."
        },
        "evaluationContexts": {
          "type": "array",
          "description": "Evaluation contexts collected for the project.",
          "items": { "$ref": "#/definitions/evaluationContext" }
        },
        "files": {
          "$ref": "#/definitions/fileMap",
          "description": "Files that belong to the project."
        },
        "id": {
          "$ref": "#/definitions/uuid",
          "description": "Project identifier."
        },
        "projectFile": {
          "type": "string",
          "description": "Path to the project file."
        },
        "references": {
          "$ref": "#/definitions/stringArray",
          "description": "List of entities referenced by the project."
        }
      },
      "additionalProperties": false
    },
    "projects": {
      "type": "object",
      "description": "Map of project identifiers to project entries.",
      "patternProperties": {
        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$": {
          "$ref": "#/definitions/projectEntry"
        }
      },
      "additionalProperties": false
    },
    "preprocessingArtifacts": {
      "type": "object",
      "description": "Artifacts produced during C++ preprocessing.",
      "required": [
        "inputFile",
        "outputFile"
      ],
      "properties": {
        "inputFile": {
          "type": "string",
          "description": "Path to the preprocessing input file."
        },
        "outputFile": {
          "type": "string",
          "description": "Path to the preprocessed output file."
        }
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "basicStage": {
      "type": "object",
      "description": "Basic information about a run stage.",
      "required": [
        "artifacts",
        "isFailed",
        "order",
        "returnCode"
      ],
      "properties": {
        "artifacts": {
          "$ref": "#/definitions/artifactMap",
          "description": "Artifacts produced or used by this stage."
        },
        "isFailed": {
          "type": "boolean",
          "description": "Indicates whether this stage failed."
        },
        "order": {
          "type": "integer",
          "description": "Execution order of this stage within the run."
        },
        "returnCode": {
          "$ref": "#/definitions/returnCode",
          "description": "Exit code returned by this stage."
        }
      },
      "additionalProperties": false
    },
    "cppPreprocessingStage": {
      "type": "object",
      "description": "Detailed information about a C++ preprocessing stage.",
      "required": [
        "artifacts",
        "environment",
        "isFailed",
        "launchArgs",
        "order",
        "output",
        "preprocessor",
        "returnCode"
      ],
      "properties": {
        "artifacts": {
          "$ref": "#/definitions/preprocessingArtifacts",
          "description": "Artifacts produced during preprocessing."
        },
        "environment": {
          "$ref": "#/definitions/stringMap",
          "description": "Environment variables used to run the preprocessor."
        },
        "isFailed": {
          "type": "boolean",
          "description": "Indicates whether preprocessing failed."
        },
        "launchArgs": {
          "$ref": "#/definitions/stringArray",
          "description": "Command-line arguments used to launch the preprocessor."
        },
        "order": {
          "type": "integer",
          "description": "Execution order of this stage within the run."
        },
        "output": {
          "$ref": "#/definitions/stringArray",
          "description": "Captured preprocessor output."
        },
        "preprocessor": {
          "type": "string",
          "description": "Path to the preprocessor executable."
        },
        "returnCode": {
          "$ref": "#/definitions/returnCode",
          "description": "Exit code returned by the preprocessor."
        }
      },
      "additionalProperties": false
    },
    "stages": {
      "type": "object",
      "description": "Stages executed as part of a file analysis run.",
      "patternProperties": {
        "^cpp-preprocessing$": {
          "$ref": "#/definitions/cppPreprocessingStage"
        }
      },
      "additionalProperties": {
        "$ref": "#/definitions/basicStage"
      }
    },
    "runEntry": {
      "type": "object",
      "description": "Information about a single analysis run.",
      "required": [
        "backend",
        "id",
        "projectId",
        "sourceFilePath",
        "stages"
      ],
      "properties": {
        "backend": {
          "type": "string",
          "description": "Analysis backend used for this run."
        },
        "dependencies": {
          "$ref": "#/definitions/stringArray",
          "description": "List of dependency file paths associated with this run."
        },
        "id": {
          "$ref": "#/definitions/uuid",
          "description": "Run identifier."
        },
        "projectId": {
          "$ref": "#/definitions/uuid",
          "description": "Identifier of the project this run belongs to."
        },
        "sourceFilePath": {
          "type": "string",
          "description": "Path to the analyzed source file."
        },
        "stages": {
          "$ref": "#/definitions/stages",
          "description": "Stages executed for this run."
        },
        "systemDirs": {
          "$ref": "#/definitions/stringArray",
          "description": "Directories treated as system directories during analysis."
        }
      },
      "additionalProperties": false
    },
    "runs": {
      "type": "object",
      "description": "Grouped runs performed during analysis.",
      "required": [
        "auxiliary",
        "executed",
        "failed",
        "skipped"
      ],
      "properties": {
        "auxiliary": {
          "type": "array",
          "description": "Runs of auxiliary tools or analyzer components.",
          "items": { "$ref": "#/definitions/runEntry" }
        },
        "executed": {
          "type": "array",
          "description": "Successfully executed analysis runs.",
          "items": { "$ref": "#/definitions/runEntry" }
        },
        "failed": {
          "type": "array",
          "description": "Analysis runs that ended with an error.",
          "items": { "$ref": "#/definitions/runEntry" }
        },
        "skipped": {
          "type": "array",
          "description": "Analysis runs skipped by the utility.",
          "items": { "$ref": "#/definitions/runEntry" }
        }
      },
      "additionalProperties": false
    },
    "dotnetToolchain": {
      "type": "object",
      "description": "Information about a detected .NET toolchain.",
      "required": [
        "cwd",
        "filePath",
        "info",
        "kind",
        "target"
      ],
      "properties": {
        "cwd": {
          "type": "string",
          "description": "Current working directory from which the toolchain was queried."
        },
        "filePath": {
          "type": "string",
          "description": "Path to the .NET toolchain executable."
        },
        "info": {
          "$ref": "#/definitions/stringArray",
          "description": "Captured output describing the toolchain."
        },
        "kind": {
          "const": "dotnet",
          "description": "Toolchain kind."
        },
        "target": {
          "$ref": "#/definitions/uuid",
          "description": "Identifier of the analysis target associated with this .NET toolchain."
        }
      },
      "additionalProperties": false
    },
    "compilerToolchain": {
      "type": "object",
      "description": "Information about a detected C/C++ compiler toolchain.",
      "required": [
        "filePath",
        "info",
        "isUnknown",
        "kind",
        "name"
      ],
      "properties": {
        "cwd": {
          "type": "string",
          "description": "Current working directory from which the compiler was queried."
        },
        "filePath": {
          "type": "string",
          "description": "Path to the compiler executable."
        },
        "info": {
          "$ref": "#/definitions/stringArray",
          "description": "Captured compiler information, typically version output."
        },
        "isUnknown": {
          "type": "boolean",
          "description": "Indicates that the compiler type could not be determined and a default value was used."
        },
        "kind": {
          "const": "c-cpp-compiler",
          "description": "Toolchain kind."
        },
        "name": {
          "type": "string",
          "description": "Detected compiler type."
        }
      },
      "additionalProperties": false
    },
    "utility": {
      "type": "object",
      "description": "Information about the utility that produced the log.",
      "required": [
        "hash",
        "isStable",
        "logVersion",
        "name",
        "path",
        "version"
      ],
      "properties": {
        "hash": {
          "type": "string",
          "pattern": "^[a-fA-F0-9]{32}$",
          "description": "MD5 checksum of the utility file."
        },
        "isStable": {
          "type": "boolean",
          "description": "Indicates whether this is a stable release build."
        },
        "logVersion": {
          "type": "integer",
          "minimum": 1,
          "description": "Log format version used by this utility."
        },
        "name": {
          "const": "pvs-studio-cmd",
          "description": "Human-readable platform-independent utility name."
        },
        "path": {
          "type": "string",
          "description": "Absolute path to the utility executable."
        },
        "version": {
          "type": "string",
          "description": "Utility version."
        }
      },
      "additionalProperties": false
    },
    "returnCode": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Exit code. May be null."
    }
  }
}
