`startColumn must be greater than or equal to 1` message should report offset for error
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- github-actions, typescript
- Bereich
- ci-cd
Rechercherichtung
Beginne mit dem Validierungsfehler in upload-lib.js in den Zeilen 201 und 251 und verfolge anschließend, wie upload-sarif-action.js Schemafehler meldet. Reproduziere den verknüpften SARIF-Upload-Fehler und ermittle, wo der fehlerhafte Offset und der umgebende Inhalt sichtbar gemacht werden können. Als erledigt gilt, wenn ungültige Werte für startColumn und endColumn verwertbare Positionsdetails statt nur der Mindestanforderungsnachricht liefern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
This run generated a not particularly helpful message:
https://github.com/check-spelling/gnu-gnulib/actions/runs/5151289440/jobs/9276309000#step:2:15096
Uploading results
Processing sarif files: ["/tmp/tmp.Ba0HZNhBK7.sarif.json"]
Error details: instance.runs[0].results[0].locations[0].physicalLocation.region.startColumn must be greater than or equal to 1
{
"path": [
"runs",
0,
"results",
0,
"locations",
0,
"physicalLocation",
"region",
"startColumn"
],
"property": "instance.runs[0].results[0].locations[0].physicalLocation.region.startColumn",
"message": "must be greater than or equal to 1",
"schema": {
"description": "The column number of the first character in the region.",
"type": "integer",
"minimum": 1
},
"instance": 0,
"name": "minimum",
"argument": 1,
"stack": "instance.runs[0].results[0].locations[0].physicalLocation.region.startColumn must be greater than or equal to 1"
}
Error details: instance.runs[0].results[0].locations[0].physicalLocation.region.endColumn must be greater than or equal to 1
{
"path": [
"runs",
0,
"results",
0,
"locations",
0,
"physicalLocation",
"region",
"endColumn"
],
"property": "instance.runs[0].results[0].locations[0].physicalLocation.region.endColumn",
"message": "must be greater than or equal to 1",
"schema": {
"description": "The column number of the character following the end of the region.",
"type": "integer",
"minimum": 1
},
"instance": 0,
"name": "minimum",
"argument": 1,
"stack": "instance.runs[0].results[0].locations[0].physicalLocation.region.endColumn must be greater than or equal to 1"
}
Error: Unable to upload "/tmp/tmp.Ba0HZNhBK7.sarif.json" as it is not valid SARIF:
- instance.runs[0].results[0].locations[0].physicalLocation.region.startColumn must be greater than or equal to 1
- instance.runs[0].results[0].locations[0].physicalLocation.region.endColumn must be greater than or equal to 1
Error: Unable to upload "/tmp/tmp.Ba0HZNhBK7.sarif.json" as it is not valid SARIF:
- instance.runs[0].results[0].locations[0].physicalLocation.region.startColumn must be greater than or equal to 1
- instance.runs[0].results[0].locations[0].physicalLocation.region.endColumn must be greater than or equal to 1
at validateSarifFileSchema (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:201:15)
at uploadFiles (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:251:9)
at Object.uploadFromActions (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:137:18)
at async run (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-sarif-action.js:48:30)
at async runWrapper (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-sarif-action.js:70:9)
The json is available here: https://github.com/check-spelling/gnu-gnulib/suites/13318061458/artifacts/727508547
Ideally when reporting issues, at a minimum, a line / character offset should be reported, and unless there's a risk of binary output breaking things, a substring showing the offending content in context would be appreciated. (I'm sure I can find the item(s), but I shouldn't have to search through an 850k file to find the problem.
Fwiw, here's the relevant snippet, and it'd be really much nicer if I didn't have to try to search for it (especially because I can't actually search for startColumn:0, I have to remember to search for startColumn":0 -- and if I'm less familiar w/ the json -- which anyone other than me would be -- then I wouldn't know if I need to consider optional whitespace..).
[{"ruleIndex":0,"ruleId":"bad-regex","message":{"text":"Bad regex. \\(bad-regex\\)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/actions/spelling/patterns.txt","uriBaseId":"%SRCROOT%"},"region":{"startLine":89,"startColumn":0,"endColumn":0}}}]}]
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.6k
- Forks
- 493
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 44
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/codeql-action
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/codeql-action#4052 · 4 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
github/codeql-action#4078 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
github/codeql-action#4008 · 9 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
github/codeql-action#3978 · 4 Kommentare · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
github/codeql-action#3915 · 6 Kommentare · 3 Reaktionen ·
Alle Issues in github/codeql-action
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
bcgov/bc-wallet-mobile#4761 · 1 Kommentar ·
-
external-issue to-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
area-deployment area-integrations triage:bot-seen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 86/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100