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

Validate usage of double quotes in expressions

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

Maintainer thường phản hồi trong vòng 7 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, python
Lĩnh vực
ci-cd, cli, devtools

Hướng nghiên cứu

Issue không nêu tên tệp hoặc bài kiểm thử nào. Hãy bắt đầu bằng việc xác định entry point xác thực workflow GitHub Actions của check-jsonschema và xem xét cách các biểu thức hiện được xử lý; được xem là hoàn thành khi việc sử dụng dấu ngoặc kép được báo cáo được phát hiện và hiển thị dưới dạng cảnh báo hoặc lỗi xác thực.

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

Mô tả

enhancement upstream-schema-issue

Motivation

We use check-jsonschema in https://github.com/Lightning-AI/lightning/ to validate all our workflow files and it works very well. We have a GitHub action for this check here.

Recently we debugged an issue in our configuration that wasn't caught by check-jsonschema. The following yaml had double quotes in the expression:

    - name: Testing Warnings
      # the stacklevel can only be set on >=3.7
      if: ${{ (steps.skip.outputs.continue == '1') && ( matrix.python-version != "3.7" ) }}
      working-directory: tests/tests_pytorch
      # needs to run outside of `pytest`
      run: python utilities/test_warnings.py

which caused an error in the workflow:


The workflow is not valid. .github/workflows/ci-pytorch-test-full.yml (Line: 167, Col: 11): Unexpected symbol: '"3'. Located at position 68 within expression: (steps.skip.outputs.continue == '1') && ( matrix.python-version != "3.7" )

And it should have used single quotes like this:

matrix.python-version != '3.7'

check-jsonschema is useful for us because we can raise these warnings directly to the author in the PR.

Pitch

Would it be possible to have check-jsonschema validate against correct usage of single quotes vs. double quotes? I am not familiar with how check-jsonschema works, whether this is technically possible, or whether this is in the scope of this tool at all.

Ngôn ngữ chính
Python
Star
341
Fork
71
Merge trung bình
6 ngày 13 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

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 python-jsonschema/check-jsonschema

Tất cả issue của python-jsonschema/check-jsonschema

Issue tương tự

Thêm issue về Python

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.