incorrect detection of missing comment
Maintainer thường phản hồi trong vòng 2 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
Hướng nghiên cứu
Tái hiện vi phạm CommentRequired bằng PMD plugin 4.18.0.v20201024-1129 và PMD 6.29.0 trên org.eclipse.titan.runtime/src/org/eclipse/titan/runtime/core/TitanLoggerApi.java, tập trung vào dòng 1382. So sánh phương thức được báo cáo với phương thức public sau đây và kiểm tra xem kích thước tệp được tạo có ảnh hưởng đến việc phát hiện chú thích hay không. Hoàn tất khi false positive được giải thích và khắc phục hoặc được tái hiện một cách đáng tin cậy bằng một regression test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When running the latest PMD plugin on our code we get a violation report we believe to be false positive.
PMD plugin version used is: 4.18.0.v20201024-1129
Containing PMD version: 6.29.0
The project used is open source: https://github.com/eclipse/titan.EclipsePlug-ins
The file where we get the report is: https://github.com/eclipse/titan.EclipsePlug-ins/blob/master/org.eclipse.titan.runtime/src/org/eclipse/titan/runtime/core/TitanLoggerApi.java
in line : 1382
violation report: "CommentRequired: Public method and constructor comments are required"
The code in question looks like this:
"
/**
* Gives access to the field id.
* Turning the template into a specific value template if needed.
*
* @return the field id.
* */
public TitanInteger_template get_field_id() {
set_specific();
return id;
}
"
As it can be seen while the function is truly public ... it also visibly has a comment.
What makes this issue more interesting is that this does not look like a consistent problem.
The public function directly following this one (with very similar signature and comment shape/form/content) does not have this violation reported on it.
I have attached 2 images showing both functions together and the reported violation.


Please note this happens several times in the code ... this occurrence was just the smallest I could find to demonstrate the issue.
Please also note, that this file is generated and so quite large (>160K lines).
This might play a role in creating the issue.
- Ngôn ngữ chính
- Java
- Star
- 99
- Fork
- 42
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pmd/pmd-eclipse-plugin
-
feature: exclude, excludeRootsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
pmd/pmd-eclipse-plugin#297 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
pmd/pmd-eclipse-plugin#212 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
pmd/pmd-eclipse-plugin#180 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
pmd/pmd-eclipse-plugin#175 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
pmd/pmd-eclipse-plugin#170 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của pmd/pmd-eclipse-plugin
Issue tương tự
-
False Negative: InnerTypeLastCheck does not report members declared after inner enums or annotationsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
checkstyle/checkstyle#22027 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug follow-up lane:auto
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Sanne/incus-spawn#1497 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[CI] NettyClientTest.testServerDisconnection may fail with DisconnectExceptionCó thể đã có người làm @yangshangqing95 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100