elementary / elementary/code

Distinguish temporary and permanent comments

Đang mở
#961 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Needs Design Priority: Wishlist
Ngôn ngữ chính
Vala
Star
521
Fork
118
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
14

Mô tả

## Problem
Comments in code may serve more than one purpose:
- Informative comments in addition to the code
- Code commented out for development purposes

It would be useful to distinguish the two so that the latter can be quickly found and removed from a final PR.

At present, `M` places `//` at the start of the text (indented if required) and so it is indistinguishable from an informative comment.

## Proposal
When toggling comment on code lines with `M` the line is commented out with (e.g. `//~`) at the very start of the line. Informative comments can then use `//` or `/*`. Moreover a search for `//~` will find the temporarily commented out code quickly.

## Prior Art
Geany uses `//~` at the start of the line for toggled comments.

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

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

Hướng nghiên cứu

Bắt đầu bằng cách lần theo lệnh bật/tắt chú thích M trong trình soạn thảo và so sánh đầu ra hiện tại của lệnh với quy ước Geany được đề cập trong issue. Hoàn thành khi các dòng mã được bật/tắt sử dụng //~ ở đầu dòng, trong khi các chú thích mang tính thông tin vẫn có thể tiếp tục sử dụng // hoặc /* và các chú thích tạm thời có thể tìm kiếm được.

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

Đánh giá

Lĩnh vực
desktop, devtools
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
52/100

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.