src/Pure/Tools/check_sources.scala
changeset 62834 970cedec9748
parent 62814 29ca4cdd998d
child 63997 e11ccb5aa82f
equal deleted inserted replaced
62833:29dfa2ed9343 62834:970cedec9748
    50       if file.endsWith(".thy") || file.endsWith(".ML") || file.endsWith("/ROOT")
    50       if file.endsWith(".thy") || file.endsWith(".ML") || file.endsWith("/ROOT")
    51     } check_file(root + Path.explode(file))
    51     } check_file(root + Path.explode(file))
    52   }
    52   }
    53 
    53 
    54 
    54 
    55   /* command line entry point */
    55   /* Isabelle tool wrapper */
    56 
    56 
    57   def main(args: Array[String])
    57   val isabelle_tool =
    58   {
    58     Isabelle_Tool("check_sources", "some sanity checks for Isabelle sources", args =>
    59     Command_Line.tool0 {
    59     {
    60       val getopts = Getopts("""
    60       val getopts = Getopts("""
    61 Usage: isabelle check_sources [ROOT_DIRS...]
    61 Usage: isabelle check_sources [ROOT_DIRS...]
    62 
    62 
    63   Check .thy, .ML, ROOT files from manifest of Mercurial ROOT_DIRS.
    63   Check .thy, .ML, ROOT files from manifest of Mercurial ROOT_DIRS.
    64 """)
    64 """)
    65 
    65 
    66       val specs = getopts(args)
    66       val specs = getopts(args)
    67       if (specs.isEmpty) getopts.usage()
    67       if (specs.isEmpty) getopts.usage()
    68 
    68 
    69       for (root <- specs) check_hg(Path.explode(root))
    69       for (root <- specs) check_hg(Path.explode(root))
    70     }
    70     })
    71   }
       
    72 }
    71 }