From 80eb76da36df9642c665ef88e3f73c34b35b93a0 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Mon, 3 Dec 2018 12:56:51 -0800 Subject: [PATCH] Annotate type signature of public methods and fields This file was littered with intellij warnings due to public members and fields not having their types annotated. Although in this case it didn't really matter, it is good practice to always annotate public methods and fields so that they can evolve in a binary compatible way. --- .../main/scala/sbt/BasicCommandStrings.scala | 104 +++++++++--------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/main-command/src/main/scala/sbt/BasicCommandStrings.scala b/main-command/src/main/scala/sbt/BasicCommandStrings.scala index 7ec8c794c..cd760a313 100644 --- a/main-command/src/main/scala/sbt/BasicCommandStrings.scala +++ b/main-command/src/main/scala/sbt/BasicCommandStrings.scala @@ -11,21 +11,21 @@ import sbt.util.Level import sbt.internal.util.complete.HistoryCommands object BasicCommandStrings { - val HelpCommand = "help" - val CompletionsCommand = "completions" - val Exit = "exit" - val Quit = "quit" - val TemplateCommand = "new" + val HelpCommand: String = "help" + val CompletionsCommand: String = "completions" + val Exit: String = "exit" + val Quit: String = "quit" + val TemplateCommand: String = "new" /** The command name to terminate the program.*/ val TerminateAction: String = Exit - def helpBrief = + def helpBrief: (String, String) = ( HelpCommand, s"Displays this help message or prints detailed help on requested commands (run '$HelpCommand ')." ) - def helpDetailed = s"""$HelpCommand + def helpDetailed: String = s"""$HelpCommand Prints a help summary. @@ -38,12 +38,12 @@ $HelpCommand Searches the help according to the provided regular expression. """ - def CompletionsDetailed = + def CompletionsDetailed: String = "Displays a list of completions for the given argument string (run 'completions ')." - def CompletionsBrief = (CompletionsCommand, CompletionsDetailed) + def CompletionsBrief: (String, String) = (CompletionsCommand, CompletionsDetailed) - def templateBrief = (TemplateCommand, "Creates a new sbt build.") - def templateDetailed = + def templateBrief: (String, String) = (TemplateCommand, "Creates a new sbt build.") + def templateDetailed: String = TemplateCommand + """ [--options]