• Stars
    star
    29,294
  • Rank 527 (Top 0.02 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Alibaba Java Coding Guidelines pmd implements and IDE plugin

P3C

最新版本:黄山版(2022.2.3发布)

License

Preface

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:

Introduction

The project consists of 3 parts:

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:

    1. Override hashCode if equals is overridden.
    2. These two methods must be overridden for Set since they are used to ensure that no duplicate object will be inserted in Set.
    3. 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.

More Repositories

1

arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
Java
33,774
star
2

easyexcel

快速、简洁、解决大文件内存溢出的java处理Excel工具
Java
29,766
star
3

nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
Java
27,983
star
4

druid

阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/137663.html) 团队出品,为监控而生的数据库连接池
Java
27,313
star
5

canal

阿里巴巴 MySQL binlog 增量订阅&消费组件
Java
26,932
star
6

spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
Java
26,669
star
7

fastjson

FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.
Java
25,472
star
8

flutter-go

flutter 开发者帮助 APP,包含 flutter 常用 140+ 组件的demo 演示与中文文档
Dart
23,471
star
9

Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
Java
21,556
star
10

weex

A framework for building Mobile cross-platform UI
C++
18,166
star
11

ice

🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
TypeScript
17,687
star
12

ARouter

💪 A framework for assisting in the renovation of Android componentization (帮助 Android App 进行组件化改造的路由框架)
Java
14,228
star
13

DataX

DataX是阿里云DataWorks数据集成的开源版本。
Java
14,082
star
14

hooks

A high-quality & reliable React Hooks library.
TypeScript
12,818
star
15

lowcode-engine

An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系
TypeScript
12,662
star
16

tengine

A distribution of Nginx with some advanced features
C
12,372
star
17

vlayout

Project vlayout is a powerfull LayoutManager extension for RecyclerView, it provides a group of layouts for RecyclerView. Make it able to handle a complicate situation when grid, list and other layouts in the same recyclerview.
Java
10,820
star
18

formily

📱🚀 🧩 Cross Device & High Performance Normal Form/Dynamic(JSON Schema) Form/Form Builder -- Support React/React Native/Vue 2/Vue 3
TypeScript
10,283
star
19

COLA

🥤 COLA: Clean Object-oriented & Layered Architecture
Java
9,964
star
20

ali-dbhub

已迁移新仓库,此版本将不再维护
8,835
star
21

atlas

A powerful Android Dynamic Component Framework.
Java
8,104
star
22

MNN

MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba
C++
8,015
star
23

rax

🐰 Rax is a progressive framework for building universal application. https://rax.js.org
JavaScript
7,956
star
24

otter

阿里巴巴分布式数据库同步系统(解决中美异地机房)
Java
7,849
star
25

anyproxy

A fully configurable http/https proxy in NodeJS
JavaScript
7,667
star
26

fish-redux

An assembled flutter application framework.
Dart
7,349
star
27

AndFix

AndFix is a library that offer hot-fix for Android App.
C++
6,954
star
28

transmittable-thread-local

📌 TransmittableThreadLocal (TTL), the missing Java™ std lib(simple & 0-dependency) for framework/middleware, provide an enhanced InheritableThreadLocal that transmits values between threads even using thread pooling components.
Java
6,750
star
29

flutter_boost

FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts
Dart
6,665
star
30

x-render

🚴‍♀️ 阿里 - 很易用的中后台「表单 / 表格 / 图表」解决方案
TypeScript
6,502
star
31

jvm-sandbox

Real - time non-invasive AOP framework container based on JVM
Java
6,410
star
32

BizCharts

Powerful data visualization library based on G2 and React.
TypeScript
6,066
star
33

freeline

A super fast build tool for Android, an alternative to Instant Run
Java
5,497
star
34

UltraViewPager

UltraViewPager is an extension for ViewPager to provide multiple features in a single ViewPager.
Java
5,004
star
35

AliSQL

AliSQL is a MySQL branch originated from Alibaba Group. Fetch document from Release Notes at bottom.
C++
4,675
star
36

dexposed

dexposed enable 'god' mode for single android application.
Java
4,483
star
37

AliOS-Things

面向IoT领域的、高可伸缩的物联网操作系统,可去官网了解更多信息https://www.aliyun.com/product/aliosthings
C
4,481
star
38

QLExpress

QLExpress is a powerful, lightweight, dynamic language for the Java platform aimed at improving developers’ productivity in different business scenes.
Java
4,361
star
39

BeeHive

🐝 BeeHive is a solution for iOS Application module programs, it absorbed the Spring Framework API service concept to avoid coupling between modules.
Objective-C
4,274
star
40

x-deeplearning

An industrial deep learning framework for high-dimension sparse data
PureBasic
4,185
star
41

HandyJSON

A handy swift json-object serialization/deserialization library
Swift
4,170
star
42

Tangram-Android

Tangram is a modular UI solution for building native page dynamically including Tangram for Android, Tangram for iOS and even backend CMS. This project provides the sdk on Android.
Java
4,110
star
43

jetcache

JetCache is a Java cache framework.
Java
4,015
star
44

coobjc

coobjc provides coroutine support for Objective-C and Swift. We added await method、generator and actor model like C#、Javascript and Kotlin. For convenience, we added coroutine categories for some Foundation and UIKit API in cokit framework like NSFileManager, JSON, NSData, UIImage etc. We also add tuple support in coobjc.
Objective-C
4,014
star
45

butterfly

🦋Butterfly,A JavaScript/React/Vue2 Diagramming library which concentrate on flow layout field. (基于JavaScript/React/Vue2的流程图组件)
JavaScript
3,943
star
46

jstorm

Enterprise Stream Process Engine
Java
3,926
star
47

dragonwell8

Alibaba Dragonwell8 JDK
Java
3,826
star
48

LuaViewSDK

A cross-platform framework to build native, dynamic and swift user interface - 强大轻巧灵活的客户端动态化解决方案
Objective-C
3,704
star
49

f2etest

F2etest是一个面向前端、测试、产品等岗位的多浏览器兼容性测试整体解决方案。
JavaScript
3,555
star
50

Alink

Alink is the Machine Learning algorithm platform based on Flink, developed by the PAI team of Alibaba computing platform.
Java
3,434
star
51

GGEditor

A visual graph editor based on G6 and React
TypeScript
3,379
star
52

cobar

a proxy for sharding databases and tables
Java
3,212
star
53

macaca

Automation solution for multi-platform. 多端自动化解决方案
3,150
star
54

lightproxy

💎 Cross platform Web debugging proxy
TypeScript
3,036
star
55

pont

🌉数据服务层解决方案
TypeScript
2,986
star
56

GraphScope

🔨 🍇 💻 🚀 GraphScope: A One-Stop Large-Scale Graph Computing System from Alibaba 来自阿里巴巴的一站式大规模图计算系统 图分析 图查询 图机器学习
C++
2,958
star
57

designable

🧩 Make everything designable 🧩
TypeScript
2,914
star
58

fastjson2

🚄 FASTJSON2 is a Java JSON library with excellent performance.
Java
2,885
star
59

euler

A distributed graph deep learning framework.
C++
2,849
star
60

beidou

🌌 Isomorphic framework for server-rendered React apps
JavaScript
2,735
star
61

sentinel-golang

Sentinel Go enables reliability and resiliency for Go microservices
Go
2,570
star
62

pipcook

Machine learning platform for Web developers
TypeScript
2,475
star
63

yugong

阿里巴巴去Oracle数据迁移同步工具(全量+增量,目标支持MySQL/DRDS)
Java
2,462
star
64

tsar

Taobao System Activity Reporter
C
2,446
star
65

kiwi

🐤 Kiwi-国际化翻译全流程解决方案
TypeScript
2,421
star
66

TProfiler

TProfiler是一个可以在生产环境长期使用的性能分析工具
Java
2,377
star
67

jvm-sandbox-repeater

A Java server-side recording and playback solution based on JVM-Sandbox
Java
2,343
star
68

taobao-iphone-device

tidevice can be used to communicate with iPhone device
Python
2,159
star
69

tair

A distributed key-value storage system developed by Alibaba Group
C++
2,103
star
70

dubbo-spring-boot-starter

Dubbo Spring Boot Starter
Java
2,103
star
71

RedisShake

redis-shake is a tool for synchronizing data between two redis databases. Redis-shake 是一个用于在两个 redis之 间同步数据的工具,满足用户非常灵活的同步、迁移需求。
Go
2,077
star
72

uirecorder

UI Recorder is a multi-platform UI test recorder.
JavaScript
2,042
star
73

ChatUI

The UI design language and React library for Conversational UI
TypeScript
1,975
star
74

LVS

A distribution of Linux Virtual Server with some advanced features. It introduces a new packet forwarding method - FULLNAT other than NAT/Tunneling/DirectRouting, and defense mechanism against synflooding attack - SYNPROXY.
C
1,947
star
75

higress

Next-generation Cloud Native Gateway | 下一代云原生网关
Go
1,886
star
76

alpha

Alpha是一个基于PERT图构建的Android异步启动框架,它简单,高效,功能完善。 在应用启动的时候,我们通常会有很多工作需要做,为了提高启动速度,我们会尽可能让这些工作并发进行。但这些工作之间可能存在前后依赖的关系,所以我们又需要想办法保证他们执行顺序的正确性。Alpha就是为此而设计的,使用者只需定义好自己的task,并描述它依赖的task,将它添加到Project中。框架会自动并发有序地执行这些task,并将执行的结果抛出来。
HTML
1,873
star
77

AliceMind

ALIbaba's Collection of Encoder-decoders from MinD (Machine IntelligeNce of Damo) Lab
Python
1,871
star
78

Tangram-iOS

Tangram is a modular UI solution for building native page dynamically, including Tangram for Android, Tangram for iOS and even backend CMS. This project provides the sdk on iOS platform.
Objective-C
1,858
star
79

EasyNLP

EasyNLP: A Comprehensive and Easy-to-use NLP Toolkit
Python
1,836
star
80

GCanvas

A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎) https://alibaba.github.io/GCanvas
C
1,831
star
81

LazyScrollView

An iOS ScrollView to resolve the problem of reusability in views.
Objective-C
1,783
star
82

testable-mock

换种思路写Mock,让单元测试更简单
Java
1,715
star
83

MongoShake

MongoShake is a universal data replication platform based on MongoDB's oplog. Redundant replication and active-active replication are two most important functions. 基于mongodb oplog的集群复制工具,可以满足迁移和同步的需求,进一步实现灾备和多活功能。
Go
1,592
star
84

EasyCV

An all-in-one toolkit for computer vision
Python
1,551
star
85

compileflow

🎨 core business process engine of Alibaba Halo platform, best process engine for trade scenes. | 一个高性能流程编排引擎
Java
1,545
star
86

xquic

XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.
C
1,544
star
87

SREWorks

Cloud Native DataOps & AIOps Platform | 云原生数智运维平台
Java
1,540
star
88

mdrill

for千亿数据即席分析
Java
1,538
star
89

Virtualview-Android

A light way to build UI in custom XML.
Java
1,452
star
90

tb_tddl

1,410
star
91

lowcode-demo

An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系
TypeScript
1,400
star
92

ilogtail

Fast and Lightweight Observability Data Collector
C++
1,374
star
93

kt-connect

A toolkit for Integrating with your kubernetes dev environment more efficiently
Go
1,359
star
94

clusterdata

cluster data collected from production clusters in Alibaba for cluster management research
Jupyter Notebook
1,358
star
95

react-intl-universal

Internationalize React apps. Not only for Component but also for Vanilla JS.
JavaScript
1,299
star
96

havenask

C++
1,293
star
97

EasyRec

A framework for large scale recommendation algorithms.
Python
1,290
star
98

bindingx

🚀 Bind actions to effects.
JavaScript
1,249
star
99

graph-learn

An Industrial Graph Neural Network Framework
C++
1,234
star
100

tfs

TFS (Taobao File System) is a distributed file system similar to GFS.
C++
1,224
star