aboutsummaryrefslogtreecommitdiff
path: root/scalastyle-config.xml
diff options
context:
space:
mode:
authorDongjoon Hyun <dongjoon@apache.org>2016-04-06 16:02:55 -0700
committerAndrew Or <andrew@databricks.com>2016-04-06 16:02:55 -0700
commitd717ae1fd74d125a9df21350a70e7c2b2d2b4786 (patch)
tree7fea2e27627c52cd6ffa04421df66068e5b28881 /scalastyle-config.xml
parent457e58befe8cb7c346e54b344a45fa357b68cfc0 (diff)
downloadspark-d717ae1fd74d125a9df21350a70e7c2b2d2b4786.tar.gz
spark-d717ae1fd74d125a9df21350a70e7c2b2d2b4786.tar.bz2
spark-d717ae1fd74d125a9df21350a70e7c2b2d2b4786.zip
[SPARK-14444][BUILD] Add a new scalastyle `NoScalaDoc` to prevent ScalaDoc-style multiline comments
## What changes were proposed in this pull request? According to the [Spark Code Style Guide](https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide#SparkCodeStyleGuide-Indentation), this PR adds a new scalastyle rule to prevent the followings. ``` /** In Spark, we don't use the ScalaDoc style so this * is not correct. */ ``` ## How was this patch tested? Pass the Jenkins tests (including `lint-scala`). Author: Dongjoon Hyun <dongjoon@apache.org> Closes #12221 from dongjoon-hyun/SPARK-14444.
Diffstat (limited to 'scalastyle-config.xml')
-rw-r--r--scalastyle-config.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/scalastyle-config.xml b/scalastyle-config.xml
index 33c2cbd293..472a8f4084 100644
--- a/scalastyle-config.xml
+++ b/scalastyle-config.xml
@@ -223,6 +223,11 @@ This file is divided into 3 sections:
]]></customMessage>
</check>
+ <check customId="NoScalaDoc" level="error" class="org.scalastyle.file.RegexChecker" enabled="true">
+ <parameters><parameter name="regex">(?m)^(\s*)/[*][*].*$(\r|)\n^\1 [*]</parameter></parameters>
+ <customMessage>Use Javadoc style indentation for multiline comments</customMessage>
+ </check>
+
<!-- ================================================================================ -->
<!-- rules we'd like to enforce, but haven't cleaned up the codebase yet -->
<!-- ================================================================================ -->