Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`startColumn must be greater than or equal to 1` message should report offset for error

オープン
#1,715 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/codeql-action のほかの issue

github/codeql-action の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。