Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,715 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, typescript
Lĩnh vực
ci-cd

Hướng nghiên cứu

Bắt đầu với lỗi xác thực trong upload-lib.js tại các dòng 201 và 251, sau đó theo dõi cách upload-sarif-action.js báo cáo các lỗi schema. Tái hiện lỗi upload SARIF được liên kết và xác định nơi có thể hiển thị offset gây lỗi cùng nội dung xung quanh. Hoàn tất khi các giá trị startColumn và endColumn không hợp lệ tạo ra thông tin vị trí có thể hành động thay vì chỉ có thông báo về ràng buộc tối thiểu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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}}}]}]
Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
493
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/codeql-action

Tất cả issue của github/codeql-action

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.