<commit_before>name := "py2cpg"

scalaVersion := "2.13.8"

libraryDependencies ++= Seq(
  "io.shiftleft"            %% "codepropertygraph"          % Versions.cpg,
  "io.shiftleft"            %% "semanticcpg"                % Versions.cpg,
  "org.rogach"              %% "scallop"                    % "4.0.4",
  "org.scala-lang.modules"  %% "scala-parallel-collections" % "1.0.4",
  "org.apache.logging.log4j" % "log4j-slf4j-impl"           % Versions.log4j     % Runtime,
  "org.scalatest"           %% "scalatest"                  % Versions.scalatest % Test
)

enablePlugins(JavaAppPackaging)
trapExit                      := false
Global / onChangedBuildSource := ReloadOnSourceChanges

val javaCCTask = taskKey[Seq[File]]("Generate compiler code with JavaCC")
javaCCTask / fileInputs += baseDirectory.value.toGlob / "pythonGrammar.jj"
javaCCTask := {
  import org.javacc.parser.{Main => JavaCCMain}
  import better.files._
  val outputDir       = (Compile / sourceManaged).value / "io" / "shiftleft" / "pythonparser"<commit_msg>Update scallop to 4.1.0 (#1075)<commit_after>name := "py2cpg"

scalaVersion := "2.13.8"

libraryDependencies ++= Seq(
  "io.shiftleft"            %% "codepropertygraph"          % Versions.cpg,
  "io.shiftleft"            %% "semanticcpg"                % Versions.cpg,
  "org.rogach"              %% "scallop"                    % "4.1.0",
  "org.scala-lang.modules"  %% "scala-parallel-collections" % "1.0.4",
  "org.apache.logging.log4j" % "log4j-slf4j-impl"           % Versions.log4j     % Runtime,
  "org.scalatest"           %% "scalatest"                  % Versions.scalatest % Test
)

enablePlugins(JavaAppPackaging)
trapExit                      := false
Global / onChangedBuildSource := ReloadOnSourceChanges

val javaCCTask = taskKey[Seq[File]]("Generate compiler code with JavaCC")
javaCCTask / fileInputs += baseDirectory.value.toGlob / "pythonGrammar.jj"
javaCCTask := {
  import org.javacc.parser.{Main => JavaCCMain}
  import better.files._
  val outputDir       = (Compile / sourceManaged).value / "io" / "shiftleft" / "pythonparser"
{'fraction_non_alphanumeric': 0.13950143815915628, 'fraction_numerical': 0.017737296260786194, 'mean_word_length': 2.4725457570715474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3935669', 'n_tokens_mistral': 732, 'n_tokens_neox': 697, 'n_words': 115}