Platform plugin output is written to standard output and breaks redirected JSON/SARIF results
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Việc chuyển hướng luồng xảy ra trong ScanCmd khi các plugin nền tảng đang chạy, vì vậy hãy bắt đầu từ đó và tìm chỗ System.out đang được trỏ vào luồng kết quả. Trong đoạn đó, hãy chuyển System.out của plugin sang System.err, giống cách System.err đã được xử lý. Hoàn thành khi bal scan --platforms=sonarqube > issues.json cho ra JSON hợp lệ và log của plugin chỉ xuất hiện trên stderr. Bản backport 0.11.x trong #165 cũng cần nhận đúng thay đổi tương tự.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
While platform plugins run, ScanCmd routes System.out to the results stream (standard output). Anything a platform plugin prints is therefore appended to the JSON or SARIF results.
The README says only the issues are written to standard output, so bal scan > issues.json saves valid JSON. With a platform selected, it does not:
bal scan --platforms=sonarqube > issues.json
issues.json then contains the plugin's logs after the results and is no longer valid JSON.
This happens on main (0.13.0) and on the 0.11.x line (raised in the review of #165).
Suggested fix
Route the plugins' System.out to standard error while they run, the same as their System.err, so standard output holds only the results.
Affected versions
0.13.0, and the 0.11.x backport in #165.
- Ngôn ngữ chính
- Java
- Star
- 15
- Fork
- 12
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 20
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
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 ballerina-platform/static-code-analysis-tool
-
Module file paths in the JSON report are only file namesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởArea/Reports Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ballerina-platform/static-code-analysis-tool#152 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/CLI Type/Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ballerina-platform/static-code-analysis-tool#140 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/Rules Type/Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
ballerina-platform/static-code-analysis-tool#179 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ballerina:13 reports boolean strings, auth scheme names and qualified secret namesCó thể đã có người làm @TharmiganK đã nhận 1 ngày trước. Đang mởArea/Rules Type/Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
ballerina-platform/static-code-analysis-tool#178 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/Rules Type/Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
ballerina-platform/static-code-analysis-tool#177 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ballerina-platform/static-code-analysis-tool
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/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 78/100
line/centraldogma#1397 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
cryptomator/hub#515 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vert-x3/vertx-mail-client#268 ·