Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Scala Docs warnings in scala-package #14081

Open
43 tasks
piyushghai opened this issue Feb 7, 2019 · 2 comments
Open
43 tasks

Scala Docs warnings in scala-package #14081

piyushghai opened this issue Feb 7, 2019 · 2 comments
Assignees
Labels
Doc Scala v1.x Targeting v1.x branch

Comments

@piyushghai
Copy link
Contributor

piyushghai commented Feb 7, 2019

I recently tried running ScalaDocChecker (http://www.scalastyle.org/rules-1.0.0.html#org_scalastyle_scalariform_ScalaDocChecker) on the MXNet Scala Package.

It resulted in over 800 violations for Scala Doc style, where each violation is either a missing or improper Scala Doc.

Here's a list of all the classes, along with the number of violations in them :

  • Model.scala 9
  • BaseModule.scala 48
  • Executor.scala 7
  • FeedForward.scala 72
  • Shape.scala 14
  • Initializer.scala 7
  • DType.scala 1
  • LRScheduler.scala 2
  • NameManager.scala 2
  • AttrScope.scala 3
  • ExecutorManager.scala 21
  • IO.scala 3
  • NDArrayIter.scala 8
  • BucketingModule.scala 2
  • NDArray.scala 181
  • KVStore.scala 12
  • NativeResource.scala 9
  • TestUtil.scala 1
  • CheckUtils.scala 2
  • Serializer.scala 7
  • WarnIfNotDiposedSuite.scala 2
  • Optimizer.scala 12
  • Profiler.scala 4
  • Base.scala 26
  • Operator.scala 39
  • LibInfo.scala 106
  • Module.scala 12
  • DataParallelExecutorGroup.scala 23
  • WarnIfNotDisposed.scala 3
  • ResourceScope.scala 4
  • RecordIO.scala 11
  • PrefetchingIter.scala 1
  • EvalMetric.scala 2
  • NativeResourceSuite.scala 3
  • SymbolAPI.scala 1
  • Monitor.scala 2
  • Symbol.scala 113
  • MX_PRIMITIVES.scala 9
  • Image.scala 4
  • SequentialModule.scala 5
  • Context.scala 6
  • OptionConversion.scala 1
  • KVStoreServer.scala 3

To reproduce these warnings, add the following in scalastyle-config.xml :

<check enabled="true" class="org.scalastyle.scalariform.ScalaDocChecker" level="warning">
    <parameters>
      <parameter name="ignoreRegex">(.*Spec$)|(.*SpecIT$)|(.*Suite$)</parameter>
      <parameter name="ignoreTokenTypes">PatDefOrDcl,TmplDef</parameter>
      <parameter name="ignoreOverride">true</parameter>
      <parameter name="indentStyle">scaladoc</parameter>
    </parameters>

  </check>

And in the parent pom.xml under the scalastyle-maven-plugin set the property : <verbose>true</verbose>

Now run :

mvn clean scalastyle:check

This will output the warnings along with their locations.

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Scala, Feature

@piyushghai
Copy link
Contributor Author

@mxnet-label-bot Add [Scala, Doc, Good First Issue]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Doc Scala v1.x Targeting v1.x branch
Projects
None yet
Development

No branches or pull requests

5 participants