stevedlawrence commented on a change in pull request #205: Update Line counter
for new modules and schemas.
URL: https://github.com/apache/incubator-daffodil/pull/205#discussion_r273443515
##########
File path: daffodil-lib/src/test/scala/LineCounter.scala
##########
@@ -71,35 +86,24 @@ object LineCounter extends App {
"src/test/scala-debug"),
filesToExclude = List("IBMTests",
"AT.tdml")) // giant mostly data tdml file.
- )),
- new LineCounterCombiner("Public schemas", List(
- // NACHA is separate due to the 2013 subdir, which we don't have a way
to deal with yet
- new LineCounter("DFDLSchemas/NACHA", root + "DFDLSchemas/NACHA",
List("2013"), List("src/test")), // only src/test as IBM wrote this schema. We
just tweeked it.
- new LineCounter("DFDLSchemas/others", root + "DFDLSchemas",
List("mil-std-2045", "png", "bmp", "NITF", "PCAP", "CSV", "jpeg"),
List("src/main", "src/test")),
- new LineCounter("jpeg2000", root, List("jpeg2000"), List("src/main",
"src/test")),
- new LineCounter("ipfix", root, List("ipfix"), List("")),
- new LineCounter("asterix", root, List("asterix"), List("src/main",
"src/test")))),
- new LineCounterCombiner("fouo-schemas", List(
- new LineCounter("fouo-schemas", root + "fouo-schemas", Nil,
List("src/main", "src/test"),
- filesToExclude = List(
- "army_drrs_lh.dfdl.tdml", // a giant tdml file that mostly just
contains data
- "sets.xsd", "fields.xsd", "messages.xsd", "composites.xsd", //
usmtf generated schema
- "link16ed6-daffodil-compliant-original.xsd",
"link16ed6-daffodil-compliant-slow.xsd", "link16ed6-daffodil-compliant.xsd", //
link16 nato generated schema
- "proposed_ded.dfdl.xsd", "proposed_msg.dfdl.xsd",
"dfidui.dfdl.xsd") //
- ),
- new LineCounter("vmf", root + "fouo-schemas/vmf", List("generator",
"schema"), List("src/main", "src/test")),
- new LineCounterOneDir("vmf other", root + "fouo-schemas/vmf",
List("build.sbt", "README.md") //
- ))), //
+ ,
+ new LineCounter("daffodil tutorial tdml tests", root + "daffodil",
List("tutorials")),
+ new LineCounter("daffodil std-layout tdml tests", root + "daffodil",
List("test-stdLayout")),
+ new LineCounter("openDFDL", root + "openDFDL/examples"))),
+ new LineCounterCombiner("Public schemas", List(new
LineCounter("DFDLSchemas", root + "DFDLSchemas"),
+ new LineCounter("jpeg2000", root, List("jpeg2000")),
+ new LineCounter("asterisk", root, List("asterisk")),
+ new LineCounter("ipfix", root + "fouo-schemas", List("ipfix"),
List("")))),
+ new LineCounter("fouo-schemas", root + "fouo-schemas",
+ filesToExclude = List("army_drrs_lh.dfdl.tdml", // a giant tdml file
that mostly just contains data
+ "link16ed6-daffodil-compliant-original.xsd",
"link16ed6-daffodil-compliant-slow.xsd", "dfidui.dfdl.xsd", // link16 nato
generated schema
+ "proposed_ded.dfdl.xsd", "proposed_msg.dfdl.xsd") //
+ ),
new LineCounterCombiner("Integrations",
- List(
- new LineCounter("calabash proper", root +
"daffodil-calabash-extension", List("calabash-server"), List("src/main",
"src/test"),
- fileSuffixesToInclude = List(".scala", ".java", ".tdml", ".xsd",
".xpl", ".sbt")),
- new LineCounter("calabash fouo", root + "daffodil-fouo",
List("calabash-test"), List("src/main", "src/test"),
- fileSuffixesToInclude = List(".scala", ".java", ".tdml", ".xpl",
".sbt")),
- new LineCounter("NiFi", root + "daffodil-nifi",
List("nifi-daffodil-nar", "nifi-daffodil-processors"), List("src/main",
"src/test")),
- new LineCounter("Spark", root, List("daffodil-spark"),
List("src/main", "src/test")))),
- new LineCounter("all sbt files", root, List("daffodil", "fouo-schemas",
"DFDLSchemas", "daffodil-calabash-extension",
- "daffodil-nifi", "jpeg2000", "daffodil-nifi", "daffodil-spark",
"ipfix", "asterix"), List(""), fileSuffixesToInclude = List(".sbt")))
+ List(new LineCounter("calabash proper", root +
"daffodil-calabash-extension", List("calabash-server")),
+ new LineCounter("calabash fouo", root + "daffodil-fouo",
List("calabash-test")),
+ new LineCounter("NiFi", root + "daffodil-nifi",
List("nifi-daffodil-nar", "nifi-daffodil-processors")),
+ new LineCounter("Spark", root, List("daffodil-spark")))))
Review comment:
This is all specific to your directory structure, and really aren't Daffodil
related, aside from the fact they they're DFDL schemas. To me. this feels like
this line counter should live outside this Daffodil repo and should have a
config file to specicy the directories and file extensions to include/exclude.
Maybe it should live in OpenDFDL?
In fact, I'm not sure if it's evn worth maintaining this. Seems effort would
be better spent using the [sbt-status](https://github.com/orrsella/sbt-stats)
plugin. The looks pretty extendable to add new metrics like TDML files, DFDL
schema files, etc. Then it's just a matter a running a script that runs "sbt
stats" on each project and adding up the numbers.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services