`startColumn must be greater than or equal to 1` message should report offset for error
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- github-actions, typescript
- 領域
- ci-cd
調査の方向性
まず upload-lib.js の 201 行目と 251 行目にあるバリデーション失敗から始め、次に upload-sarif-action.js がスキーマエラーをどのように報告するかを追跡します。リンクされた SARIF のアップロード失敗を再現し、問題のあるオフセットと周辺の内容をどこで表示できるかを特定します。startColumn と endColumn の無効な値によって、最小制約のメッセージだけでなく、対応可能な位置情報の詳細が生成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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}}}]}]
- 主要言語
- TypeScript
- スター
- 1.6k
- フォーク
- 493
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 44
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/codeql-action のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/codeql-action#4052 · コメント 4 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
github/codeql-action#4078 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
github/codeql-action#4008 · コメント 9 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
github/codeql-action#3978 · コメント 4 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
github/codeql-action#3915 · コメント 6 件 · リアクション 3 件 ·
github/codeql-action の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
fil-donadoni/tolaria#4409 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
corsairdev/corsair#1764 ·