Allow for regex in dictionaries

Đang mở
#3,632 7 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 1 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
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
devtools

Hướng nghiên cứu

Start by tracing how dictionary entries are parsed and matched, and review the existing dictionary tests. Check how a pattern such as .*master.* should behave for timemaster; done means dictionary regexes are recognized and matching terms are reported as requested.

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

Mô tả

enhancement question

I am considering using codespell to search for non-inclusive terms in our code. codespell has a built-in dictionary in https://github.com/codespell-project/codespell/blob/main/codespell_lib/data/dictionary_usage.txt.
However, codespell cannot search words from dictionary as a substring. For example, cosider this line:
timemaster is a program that uses ptp4l and phc2sys in combination with chronyd or ntpd to synchronize the system clock to NTP and PTP time masters.

Codespell would report the use of masters but it ignores timemaster.
I wonder if it is possible to allow passing regular expressions in the dictionary. So that I can add .*master.* to a dictionary and expect codespell to catch all strings that match that regex.

Ngôn ngữ chính
Python
Star
2.4k
Fork
531
Merge trung bình
15 giờ 55 phút
Pull request đã merge (30 ngày)
17

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có 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 codespell-project/codespell

Tất cả issue của codespell-project/codespell

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.