Điểm qua alibaba/p3c: 30.8k sao trên GitHub, viết chủ yếu bằng Kotlin. Alibaba Java Coding Guidelines pmd implements and IDE plugin
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
We are pleased to present Alibaba Java Coding Guidelines which consolidates the best programming practices over the years from Alibaba Group's technical teams. A vast number of Java programming teams impose demanding requirements on code quality across projects as we encourage reuse and better understanding of each other's programs. We have seen many programming problems in the past. For example, defective database table structures and index designs may cause software architecture flaws and performance risks. Another example is confusing code structures being difficult to maintain. Furthermore, vulnerable code without authentication is prone to hackers’ attacks. To address these kinds of problems, we developed this document for Java developers at Alibaba.
For more information please refer the Alibaba Java Coding Guidelines:
中文版: 直接下载上方的PDF文件(黄山版)
English Version: Alibaba Java Coding Guidelines
Introduction
The project consists of 3 parts:
PMD implementations
IntelliJ IDEA plugin
Eclipse plugin
Rules
Forty-nine rules are realized based on PMD, please refer the P3C-PMD documentation for more detailed information. Four rules are implemented within IDE plugins (IDEA and Eclipse) as follows:
[Mandatory] Using a deprecated class or method is prohibited.
Note: For example, decode(String source, String encode) should be used instead of the deprecated method decode(String encodeStr). Once an interface has been deprecated, the interface provider has the obligation to provide a new one. At the same time, client programmers have the obligation to check out what its new implementation is.
[Mandatory] An overridden method from an interface or abstract class must be marked with @Override annotation.
Counter example: For getObject() and get0bject(), the first one has a letter 'O', and the second one has a number '0'. To accurately determine whether the overriding is successful, an @Override annotation is necessary. Meanwhile, once the method signature in the abstract class is changed, the implementation class will report a compile-time error immediately.
[Mandatory] A static field or method should be directly referred by its class name instead of its corresponding object name.
[Mandatory] The usage of hashCode and equals should follow:
Override hashCode if equals is overridden.
These two methods must be overridden for Set since they are used to ensure that no duplicate object will be inserted in Set.
These two methods must be overridden if self-defined object is used as the key of Map.
Note: String can be used as the key of Map since these two methods have been rewritten.
alibaba/p3c có 30.8k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/alibaba/p3c. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
alibaba/p3c có phải mã nguồn mở không?
Có — alibaba/p3c phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/alibaba/p3c.
alibaba/p3c còn đang phát triển không?
Commit gần nhất trên alibaba/p3c là 2.0 năm trước (theo timestamp GitHub). Repo có 8.0k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
alibaba/p3c dùng license gì?
alibaba/p3c phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
alibaba/p3c là gì?
alibaba/p3c (alibaba/p3c) là dự án Kotlin trên GitHub. Theo mô tả gốc: Alibaba Java Coding Guidelines pmd implements and IDE plugin
alibaba/p3c viết bằng ngôn ngữ gì?
alibaba/p3c chủ yếu viết bằng Kotlin. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về alibaba/p3c ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/alibaba/p3c là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về p3c?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về p3c.