You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2021/01/09 21:36:04 UTC
[orc] branch branch-1.6 updated: ORC-718: Enable Checkstyle plugin
and FileTabCharacter rule
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-1.6
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-1.6 by this push:
new 27b0783 ORC-718: Enable Checkstyle plugin and FileTabCharacter rule
27b0783 is described below
commit 27b0783acac0c791d1d5974716bf735ee5f0e958
Author: William Hyun <62...@users.noreply.github.com>
AuthorDate: Sat Jan 9 11:27:32 2021 -0800
ORC-718: Enable Checkstyle plugin and FileTabCharacter rule
### What changes were proposed in this pull request?
This PR aims to enable Checkstyle plugin and FileTabCharacter rule.
### Why are the changes needed?
This will be helpful to improve code quality.
It would be great if we could enable this in GitHub action.
### How was this patch tested?
Manual
```
mvn checkstyle:check
```
(cherry picked from commit 9b9bac2e9c6c08ec40e1f8e9a48e5f79c539fdfc)
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.../java/org/apache/orc/impl/mask/SHA256MaskFactory.java | 2 +-
java/pom.xml | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/java/core/src/java/org/apache/orc/impl/mask/SHA256MaskFactory.java b/java/core/src/java/org/apache/orc/impl/mask/SHA256MaskFactory.java
index d6e7378..85264aa 100644
--- a/java/core/src/java/org/apache/orc/impl/mask/SHA256MaskFactory.java
+++ b/java/core/src/java/org/apache/orc/impl/mask/SHA256MaskFactory.java
@@ -95,7 +95,7 @@ public class SHA256MaskFactory extends MaskFactory {
case VARCHAR: {
/* truncate the hash if max length for varchar is less than hash length
* on the other hand if if the max length is more than hash length (64
- * bytes) we use the hash length (64 bytes) always.
+ * bytes) we use the hash length (64 bytes) always.
*/
if (schema.getMaxLength() < hash.length) {
targetLength = schema.getMaxLength();
diff --git a/java/pom.xml b/java/pom.xml
index 5620841..b18d59e 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -183,6 +183,20 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>3.1.1</version>
+ <configuration>
+ <checkstyleRules>
+ <module name="Checker">
+ <module name="FileTabCharacter">
+ <property name="eachLine" value="true"></property>
+ </module>
+ </module>
+ </checkstyleRules>
+ </configuration>
+ </plugin>
</plugins>
<pluginManagement>
<plugins>