Skip to content
CAI
Software that uses CAICheck a score

alibaba/p3c

54.9

Adequate · 22 September 2026

14.1k

lines of production code

Kotlin

with Java

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a set of IDE plugins for Eclipse and IntelliJ IDEA that enforces Alibaba's Java coding guidelines through static code analysis. It provides real-time inspections, automated quick-fixes, and detailed violation reporting to help developers maintain code quality. The system also includes a comprehensive documentation of the coding standards and supports internationalization for user-facing messages.

Features

Add Alibaba Java Coding Guidelines documentation

The \p3c-gitbook\ directory was added, containing the full text of the Alibaba Java Coding Guidelines in Markdown format. This includes comprehensive rules for naming, constants, code formatting, OOP, collections, concurrency, control statements, comments, exception handling, logging, security, engineering structure, and MySQL database practices. The addition includes configuration files for the GitBook generator (\book.json\, \SUMMARY.md\) and a \.gitignore\ file to exclude build artifacts.

p3c-gitbook · high confidence

Add UI components for displaying inspection results and rule details

The Eclipse plugin introduces a new set of UI classes to display inspection results and rule details. This includes the \InspectionResultTreeContentProvider\ and \InspectionResultTreeLabelProvider\ to populate a tree view of violations, \InspectionResults\ to manage the state of inspection data, and \InspectionResultView\ to host the tree. Additionally, \RuleDetailView\ and \RuleDetailComposite\ provide a side panel to show detailed information about selected rules, while \AllRulesPreferencePage\ and \AllRulesView\ allow users to browse all available rules. The \QuickFixAction\ enables applying quick fixes to violations directly from the UI.

eclipse-plugin/com.alibaba.smartfox.eclipse.plugin/src/main/kotlin/com/alibaba/smartfox/eclipse/ui · high confidence

Add new inspection actions and compatibility layers for IDE integration

The \idea-plugin/p3c-common\ module introduces several new Kotlin files that implement the core inspection actions and compatibility layers for the IDE plugin. This includes \AliInspectionAction\ and \PmdGlobalInspectionContextImpl\ to handle the execution of code inspections, \SwitchLanguageAction\ for toggling the plugin's UI language, and \InspectionProfileService\ to manage inspection profiles across different IntelliJ IDEA versions. Additionally, a suite of specific inspection implementations (such as \AliEqualsAvoidNullInspection\ and \AliControlFlowStatementWithoutBracesInspection\) are added to enforce Alibaba's coding standards, supported by a new \InspectionActionExtensionPoint\ to allow other plugins to hook into the inspection lifecycle.

idea-plugin/p3c-common/src/main/kotlin · high confidence

Add quick-fix actions and inspection infrastructure for Eclipse and IntelliJ plugins

The Eclipse plugin now includes a \QuickFixGenerator\ that provides automated corrections for specific PMD rules, such as replacing lowercase 'l' with 'L' in \UpperEllRule\ and flipping \EqualsAvoidNullRule\ comparisons. The IntelliJ plugin introduces a new \AliLocalInspectionToolProvider\ that dynamically generates inspection tools from PMD rules, alongside a caching mechanism in \AliPmdInspectionInvoker\ to improve performance. Additionally, the Eclipse plugin adds a \CodeAnalysisHandler\ to process selected files and a \SwitchLanguageHandler\ to toggle the UI language, while the IntelliJ plugin adds a \ToggleProjectInspectionAction\ to enable or disable all inspections at once.

p3c-pmd · high confidence

Added Alibaba coding guideline rules and localization strings to the Eclipse plugin

The Eclipse plugin now includes the resource files required to enforce and display Alibaba's Java coding guidelines. This adds specific static analysis rules (such as requiring @Override annotations, avoiding static access via instances, and enforcing hashCode/equals for Map keys) to the IDE's code analysis. Additionally, it introduces bilingual (Chinese and English) user-facing messages for these rules and the language-switching feature, ensuring that error messages and descriptions are properly localized for users.

eclipse-plugin/com.alibaba.smartfox.eclipse.plugin/src/main/resources · high confidence

Added P3cIcons class to centralize IDE icon resources

A new Java class, P3cIcons, has been introduced to manage IDE icons for the plugin. This change provides a centralized way to access UI icons such as ANALYSIS\_ACTION, PROJECT\_INSPECTION\_ON/OFF, LANGUAGE, and ALIBABA, which will be used by the IDE to display relevant visual indicators in the user interface.

idea-plugin/p3c-common/src/main/java · high confidence

Added code cleanup and internationalization support for the Eclipse plugin

The Eclipse plugin now includes new Kotlin utilities for automated code cleanup and message localization. The \CleanUps\ object provides a \fix\ method that applies specific Java code cleanups (such as adding missing annotations and enforcing block usage in control statements) to Java compilation units, integrating with the Eclipse JDT refactoring framework. Additionally, the \P3cBundle\ object was added to manage internationalized messages by loading resources from \messages.P3cBundle\ using the plugin's locale, enabling consistent user-facing text across the plugin.

eclipse-plugin/com.alibaba.smartfox.eclipse.plugin/src/main/kotlin/com/alibaba/smartfox/eclipse/message, eclipse-plugin/com.alibaba.smartfox.eclipse.plugin/src/main/kotlin/com/alibaba/smartfox/eclipse/util · medium confidence

Eclipse plugin v2.0.1 release with new UI views and commands

The Eclipse plugin has been updated to version 2.0.1, introducing new UI components including the 'P3C Results' and 'Rule Detail' views, along with corresponding commands and handlers for code analysis and language switching. The plugin now supports manual code scanning via right-click menus, toolbar buttons, and a dedicated view to display violations and rule details. Additionally, a Chinese language manual (README\_cn.md) and a .gitignore file have been added to the plugin directory.

eclipse-plugin · high confidence

Initial release of the Alibaba Java Coding Guidelines plugin for IntelliJ IDEA

The idea-plugin directory is introduced, providing the source and build scripts (Gradle wrapper) for the Alibaba Java Coding Guidelines plugin. This enables users to build, run, and install the plugin, which offers real-time code inspections, code analysis, and Quick Fix capabilities for Java code within IntelliJ IDEA. The release includes English and Chinese documentation (README.md, README\_cn.md) and a .gitignore file to streamline development and usage.

idea-plugin · high confidence

Introduce background code analysis job with concurrency control

Added CodeAnalysis and P3cMutex classes to handle background code analysis. The CodeAnalysis object processes resources by collecting files, running PMD-based analysis, and updating inspection results. The P3cMutex object implements ISchedulingRule to ensure the analysis job runs exclusively, preventing concurrent execution of multiple analysis tasks.

eclipse-plugin/com.alibaba.smartfox.eclipse.plugin/src/main/kotlin/com/alibaba/smartfox/eclipse/job · high confidence

New PMD-based static analysis rules for Java code quality

The Eclipse plugin now includes a suite of new static analysis rules implemented in Kotlin, providing deeper code quality checks. These include detecting missing @Override annotations, identifying usage of deprecated APIs, ensuring Map/Set keys override equals/hashCode, preventing static access via instances, and more. The implementation leverages the Eclipse JDT AST to parse and analyze Java source files, reporting violations directly within the IDE.

eclipse-plugin/com.alibaba.smartfox.eclipse.plugin/src/main/kotlin/com/alibaba/smartfox/eclipse/pmd · high confidence

Behavioural changes

Upgraded Gradle wrapper to version 6.6

The project now uses Gradle 6.6 as the required build tool, ensuring compatibility with newer IDE versions (2018.3+) and addressing a compatibility issue with Idea 2020.2 Ultimate.

idea-plugin/gradle · medium confidence

Fixes

Added Chinese and English localization strings and PMD rule configuration for Alibaba coding guidelines

The plugin now includes localized message bundles (P3cBundle.xml and P3cBundle\_en.xml) providing Chinese and English translations for inspection messages, quick fixes, and descriptions for rules such as AliAccessStaticViaInstanceInspection, AliMissingOverrideAnnotationInspection, and MapOrSetKeyShouldOverrideHashCodeEqualsInspection. Additionally, the ali-pmd.xml configuration file is introduced to define the active PMD ruleset, explicitly excluding specific rules like ArrayNamingShouldHaveBracketRule, UpperEllRule, EqualsAvoidNullRule, WrapperTypeEqualityRule, and NeedBraceRule from their respective categories. A FreeMarker template for static descriptions is also added.

idea-plugin/p3c-common/src/main/resources · medium confidence

Dependencies

Update Eclipse and IntelliJ plugin dependencies to support newer IDE versions

The build configuration for the Eclipse and IntelliJ IDEA plugins has been updated to ensure compatibility with newer versions of these IDEs. The Eclipse plugin's Maven build (pom.xml) now targets version 2.0.1-SNAPSHOT and includes dependencies on p3c-pmd 2.0.1 and Kotlin 1.3.30. The IntelliJ plugin's Gradle build (build.gradle) has been updated to use Kotlin version 1.3.72 and targets IDE version 2018.3 and above, ensuring that the plugin functions correctly on modern IDE releases.

(dependencies) · medium confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 47 → 55 (+7.5)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 95 → 94 (-0.3)
  • Architecture 100 → 100 (-0.4)
  • Maturity 46 → 46 (+0.0)
  • Readiness 24 → 36 (+11.7)
  • Security 83 → 100 (+16.7)

Resolved (9)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • LLM evaluation failed
  • No exposed public API
  • Scanner failed to run — not a clean result
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (30)

  • AbstractMethodOrInterfaceMethodMustUseJavadocRule.visit (cognitive 18) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/comment/AbstractMethodOrInterfaceMethodMustUseJavadocRule.java)
  • AvoidCallStaticSimpleDateFormatRule.handleFlowNode (cognitive 20) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/concurrent/AvoidCallStaticSimpleDateFormatRule.java)
  • ClassTooLong: FixClassTypeResolver (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/fix/FixClassTypeResolver.java)
  • ConcurrentExceptionWithModifyOriginSubListRule.visit (cognitive 16) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/set/ConcurrentExceptionWithModifyOriginSubListRule.java)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • EqualsAvoidNullRule.visit (cognitive 27) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/oop/EqualsAvoidNullRule.java)
  • FileTooLong: fix/FixClassTypeResolver.java (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/fix/FixClassTypeResolver.java)
  • FixClassTypeResolver.populateType (cognitive 25) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/fix/FixClassTypeResolver.java)
  • FixClassTypeResolver.populateType (cyclomatic 16) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/fix/FixClassTypeResolver.java)
  • FixClassTypeResolver.rollupTypeBinaryNumericPromotion (cognitive 32) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/fix/FixClassTypeResolver.java)
  • FixClassTypeResolver.rollupTypeBinaryNumericPromotion (cyclomatic 22) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/fix/FixClassTypeResolver.java)
  • MethodReturnWrapperTypeRule.visit (cognitive 19) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/exception/MethodReturnWrapperTypeRule.java)
  • MethodReturnWrapperTypeRule.visit (cyclomatic 16) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/exception/MethodReturnWrapperTypeRule.java)
  • MethodTooLongRule.getCommentLineCount (cognitive 16) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/other/MethodTooLongRule.java)
  • RemoveCommentedCodeRule.checkCommentsBetweenDeclarations (cognitive 27) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/comment/RemoveCommentedCodeRule.java)
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result
  • StringConcatRule.checkStringConcat (cognitive 32) (p3c-pmd/src/main/java/com/alibaba/p3c/pmd/lang/java/rule/oop/StringConcatRule.java)
  • …and 10 more

Architecture

  • Containers 0 added · 0 removed · contexts 2 added · 1 removed · edges 0 added · 0 removed

Added bounded contexts (2)

  • com.alibaba.smartfox.eclipse.plugin
  • p3c-common

Removed bounded contexts (1)

  • p3c-pmd

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

alibaba/p3c was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6c59c8c36ecd8722c712d5685b8c3822c1c8b030 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.