You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SPEC.md
+29-3
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ An `issue` represents a single instance of a real or potential code problem, det
77
77
*`content` -- **Optional**. A markdown snippet describing the issue, including deeper explanations and links to other resources.
78
78
*`categories` -- **Required**. At least one category indicating the nature of the issue being reported.
79
79
*`location` -- **Required**. A `Location` object representing the place in the source code where the issue was discovered.
80
-
*`other_locations` -- **Optional.**An array of `Location` objects useful for engines which highlight more than one source location in an issue.
80
+
*`trace` -- **Optional.**A `Trace` object representing other interesting source code locations related to this issue.
81
81
*`remediation_points` -- **Optional**. An integer indicating a rough estimate of how long it would take to resolve the reported issue.
82
82
*`severity` -- **Optional**. A `Severity` string (`info`, `normal`, or `critical`) describing the potential impact of the issue found.
83
83
@@ -180,9 +180,35 @@ Contents give more information about the issue's check, including a description
180
180
"body": "This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See [this page](http://c2.com/cgi/wiki?AbcMetric) for more information on ABC size."
181
181
}
182
182
```
183
-
### Other Locations
183
+
### Source Code Traces
184
184
185
-
Some engines require the ability to refer to other source locations. For this reason, the Issue type has an optional `other_locations` field, which is an array of other `Location` items that this issue needs to refer to.
185
+
Some engines require the ability to refer to other source locations in describing an issue. For this reason, an `Issue` object can have an associated `Trace`, a data structure meant to represent ordered or unordered lists of source code locations. A `Trace` has the following fields:
186
+
187
+
*`locations` -- **[Location] - Required**. An array of `Location` objects.
188
+
*`stacktrace` -- **Boolean - Optional**. When `true`, this `Trace` object will be treated like an ordered stacktrace by the CLI and the Code Climate UI.
0 commit comments