Identification of CPP directives in UMDP3_checker

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

@r-sharp đang làm issue này rồi.

Từ ngày 31/7/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement

The current C pre-processor pattern assumes that there are no spaces between the start of a line and the # symbol:

comment_line = re.compile(r"!.*$")
cpp_command_line = re.compile(r"^#.*$")
word_splitter = re.compile(r"\b\w+\b")

However, the GNU C pre-processor manual explicitly says that spaces before the hash symbol are allowed:

Preprocessing directives are lines in your program that start with ‘#’. Whitespace is allowed before and after the ‘#’. The ‘#’ is followed by an identifier, the directive name. It specifies the operation to perform.

The pattern should probably allow leading whitespace. This doesn't seem to cause problems for the UM, but it may result in unexpected failures in other code bases.

Ngôn ngữ chính
Python
Star
9
Fork
19
Merge trung bình
5 ngày 48 phút
Pull request đã merge (30 ngày)
4

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 MetOffice/SimSys_Scripts

Tất cả issue của MetOffice/SimSys_Scripts

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.