redhat-developer / redhat-developer/vscode-java
References to google-styleguide in formatter documentation
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
Problem
The official documentation page about linting has a section about formatting which includes a link to the unmaintened/abandoned google/styleguide repo which might be misleading to some unfamiliar with the differences between google/styleguide and google-java-format.
A bit more explanation
The project, I currently work on uses the Intellij google-java-format plugin (like almost any other project, I have worked on in the past 6+ years). I know that the section above links to google/styleguide repo, which is not the same as google/google-java-format repo. Not being overly familiar with the repos, I thought that the formatting output should be the same (or at least very similiar), especially, because the offical documentation links to it.
After spending a few hours trying to get a working solution, it seems to me, that the google/styleguide java style is abandoned (last updated 5 years ago), without an offical statement. I found this issue which funnily enough also mentions the vscode-java docs.
The formatting output is very different. Here is a small example:
google/styleguide:

google/google-java-format:

Suggestion
Can the reference to the google styleguide be removed? I think it would be bad idea to just mention that the formatter is unmaintained, because people don't read carefully enough, instead just copy the configuration.
I know the referenced documentation is not part of this repo, but I (as somebody unaffiliated with vscode-java) didn't want to open an issue on the vscode repo straight away.
google-java-format Solution
This stackoverflow question lists different solutions.
There are a lot of plugins that are floating around (mostly forks of one plugin) where I tried a few, but none worked: https://marketplace.visualstudio.com/search?term=google%20java%20format&target=VSCode&category=All%20categories&sortBy=Relevance
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.
Hướng nghiên cứu
Bắt đầu bằng việc xem lại phần tài liệu về Java linting được liên kết trong issue và so sánh tham chiếu đến google/styleguide của phần đó với google/google-java-format. Được coi là hoàn tất khi tham chiếu gây hiểu lầm được xóa hoặc sửa trong tài liệu, nhưng issue không xác định tệp nào trong repository này và cũng không cho biết trang bên ngoài đó được duy trì ở đâu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100