This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-1.8 by this push:
new 5de2c1758 ORC-1308: Add `AvoidStarImport` checkstyle rule
5de2c1758 is described below
commit 5de2c1758f48e42dd2241f5a30132d6372e3d9c8
Author: deshanxiao <[email protected]>
AuthorDate: Mon Nov 7 11:53:00 2022 -0800
ORC-1308: Add `AvoidStarImport` checkstyle rule
### What changes were proposed in this pull request?
This PR is aimed to avoid importing all classes from a package or static
members from a class leads.
### Why are the changes needed?
For codestyle:
After the PR, stat import will be forbidden as following:
- class imports like import java.util.*;
- static member imports like import static org.junit.Assert.*;.
https://checkstyle.sourceforge.io/config_imports.html#AvoidStarImport
### How was this patch tested?
UT
Closes #1309 from deshanxiao/deshan/1308.
Authored-by: deshanxiao <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit d4f4ea739bd4f1b9b638cf0d5c4d8bff092c0a97)
Signed-off-by: Dongjoon Hyun <[email protected]>
---
java/checkstyle.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/java/checkstyle.xml b/java/checkstyle.xml
index d7a84d4c2..59b243c91 100644
--- a/java/checkstyle.xml
+++ b/java/checkstyle.xml
@@ -31,6 +31,10 @@
<module name="TreeWalker">
<module name="OuterTypeFilename"/>
<module name="CommentsIndentation"/>
+ <module name="AvoidStarImport">
+ <property name="allowClassImports" value="false"/>
+ <property name="allowStaticMemberImports" value="false"/>
+ </module>
<module name="UnusedImports"/>
<module name="RedundantImport"/>
<!-- https://checkstyle.sourceforge.io/config_imports.html#ImportOrder
IntelliJ default example -->