Skip to content

next

The next action retrieves the next batch of issues to work on. Issues are grouped by file, so you can fix all issues in one file before moving to the next.

{
"action": "next",
"scope": {"rule": "ConstantValue"},
"limit": 5
}
ParameterTypeRequiredDescription
scopeobjectNoFilter issues (see Scope Filtering)
limitintegerNoMaximum issues to return (default: 25)
fmtstringNoOutput format: "default" or "checklist"
{
"file": "src/main/java/Service.java",
"issues": [
{
"fp": "88d32cab35478753",
"rule": "ConstantValue",
"loc": "45:12",
"msg": "Condition 'value != null' is always true",
"sev": "H",
"snip": "if (value != null) {"
},
{
"fp": "ab1c2d3e12345678",
"rule": "ConstantValue",
"loc": "67:8",
"msg": "Condition 'list.isEmpty()' is always false",
"sev": "H",
"snip": "if (list.isEmpty()) {"
}
],
"prog": {"rem": 19, "remF": 7, "fixed": 10, "skip": 2}
}
FieldDescription
fileFile path containing these issues
issuesArray of issue objects
progProgress summary
checklistArray of checklist items (present when fmt is "checklist")
FieldDescription
taskHuman-readable task description
fpFingerprint of the issue
FieldDescription
fpFingerprint - unique ID for this issue
ruleRule ID from the static analysis tool
locLocation as line:column
msgIssue message/description
sevSeverity: H (High), M (Moderate), L (Low)
snipCode snippet showing the issue
ctxContext lines surrounding the issue (when available)
FieldDescription
remRemaining issues (in current scope)
remFRemaining files with issues
fixedIssues marked as fixed
skipIssues marked as skipped

Issues are always returned grouped by file. If there are 5 issues in Service.java and you call next without specifying a limit, you’ll get all 5 (since 5 is under the default limit of 25).

The limit parameter caps issues returned, but stays within one file:

  • If Service.java has 10 issues and limit=5, you get 5 issues from Service.java
  • Mark those 5 as done, then call next again to get the remaining 5 from the same file
  • Without marking issues as done, next returns the same batch

Apply filters to focus on specific issues:

{"action": "next", "scope": {"rule": "ConstantValue", "severity": "High"}}
{"action": "next"}
{"action": "next", "scope": {"rule": "ConstantValue"}}
{"action": "next", "limit": 3}
{
"action": "next",
"scope": {"severity": "High", "file": "src/**/*.java"},
"limit": 5
}

When no more issues match your scope:

{
"issues": [],
"prog": {"rem": 0, "remF": 0, "fixed": 45, "skip": 3}
}
Error CodeCauseSolution
SARIF_NOT_LOADEDNo SARIF file has been loadedCall load first
INVALID_SCOPEInvalid scope filterCheck severity is High, Moderate, or Low
INVALID_LIMITLimit is not a number, or is zero/negativeProvide a positive integer
DB_ERRORDatabase error occurredCheck .sheriff/ directory permissions