Remove CheckStyle code formatting plugin #1362
Labels
Build Libraries & Interfaces
enhancement
Enhancement or improvement to existing feature or request
v1.2.0
Issues related to version 1.2.0
Is your feature request related to a problem? Please describe.
Currently the project has two formatting tools Spotless and CheckStyle. Spotless itself can format the code and check the standard java code using
spotlessApply
andspotlessJavaCheck
respectively. Both the plugins have different configuration for formatting which restrict us to run Spotless on all the subprojects. Removing CheckStyle will help to run a unified formatting on the codebase.There are two code styling plugins used currently:
OpenSearch Core had two code styling plugins Spotless and CheckStyle. Spotless itself can format the code and check the standard java code using spotlessApply and spotlessJavaCheck respectively. Both the plugins have different configuration for formatting which restricted us to run Spotless on all the subprojects. Removing CheckStyle helped to run a unified formatting on the codebase.
How plugins were using CheckStyle?
Plugins were using CheckStyle formatting plugin present in OpenSearch Core’s build.gradle. When OpenSearch decided to go with Spotless in 1.2 and removed CheckStyle plugin, it caused issue on plugins side and the build broke as CheckStyle plugin was not available to format the code on plugin side. Related issue: #1362
Reason OpenSearch decided to go with Spotless:
This was done because OpenSearch had 2 code styling plugins: Spotless and CheckStyle. Both the plugins have different configurations which created a conflict to have the same formatting over the whole codebase. Huge advantage of using Spotless over CheckStyle is in addition to check the formatting of the code it also has
apply
goal that fixes all the style and formatting.Meta issue to track Spotless run: #974
Describe the solution you'd like
Remove CheckStyle plugin and use Spotless for formatting.
The text was updated successfully, but these errors were encountered: