joescii / snmp4s

Idiomatic type-safe Scala DSL for SNMP
23 stars 12 forks source link

Scaladoc problem #1

Open marklister opened 11 years ago

marklister commented 11 years ago

Here's as far as I got tidying up my scaladoc:

diff --git a/src/compiler/scala/tools/nsc/doc/Settings.scala b/src/compiler/scala/tools/nsc/doc/Settings.scala
index 02630a9..43953ca 100644
--- a/src/compiler/scala/tools/nsc/doc/Settings.scala
+++ b/src/compiler/scala/tools/nsc/doc/Settings.scala
@@ -301,16 +301,28 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_))
      * TODO: Should be configurable
      */
     def isExcluded(qname: String) = {
-      ( ( qname.startsWith("scala.Tuple") || qname.startsWith("scala.Product") ||
+       val excluded= Set("scala.Tuple", "scala.Product", "scala.Function","scala.runtime.AbstractFunction",
+                         "org.catch22.collections.immutable.CollSeq",
+                         "org.catch22.collections.io.CsvParser")
+       val included= Set("scala.Tuple1","scala.Tuple2",
+                         "scala.Product","scala.Product1","scala.Product2",
+                         "scala.Function","scala.Function1","scala.Function2",
+                         "scala.runtime.AbstractFunction0","scala.runtime.AbstractFunction1",
+                         "scala.runtime.AbstractFunction2", "org.catch22.collections.immutable.CollSeq",
+                         "org.catch22.collections.immutable.CollSeq1", "org.catch22.collections.immutable.CollSeq2",
+                         "org.catch22.collections.io.CsvParser","org.catch22.collections.io.CsvParser1",
+                         "org.catch22.collections.io.CsvParser2")
+      /*( ( qname.startsWith("scala.Tuple") || qname.startsWith("scala.Product") ||
          qname.startsWith("scala.Function") || qname.startsWith("scala.runtime.AbstractFunction")
        ) && !(
-        qname == "scala.Tuple1" || qname == "scala.Tuple2" ||
-        qname == "scala.Product" || qname == "scala.Product1" || qname == "scala.Product2" ||
+        qname == "scala.Tuple1" || qname == "scala.Tuple2" || 
+        qname == "scala.Product" || qname == "scala.Product1" || qname == "scala.Product2"  ||
         qname == "scala.Function" || qname == "scala.Function1" || qname == "scala.Function2" ||
         qname == "scala.runtime.AbstractFunction0" || qname == "scala.runtime.AbstractFunction1" ||
         qname == "scala.runtime.AbstractFunction2"
       )
-     )
+     )*/
+     !excluded.forall(!qname.startsWith(_)) && ! included(qname)
     }

     /** Common conversion targets that affect any class in Scala */
marklister commented 11 years ago

I'll push it to my repo if you want.

joescii commented 11 years ago

Thanks! As I mentioned over at sbt-boilerplate, I think I have an approach that will eliminate this issue altogether. It'll solve several problems, in fact.