Skip to content

Commit

Permalink
remove unused variables (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgfraser authored Apr 4, 2022
1 parent 7d87012 commit e46d398
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion zio-cli/shared/src/main/scala/zio/cli/CliApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ object CliApp {

case ShowCompletionScript(path, shellType) =>
printLine(CompletionScript(path, if (command.names.nonEmpty) command.names else Set(name), shellType))
case ShowCompletions(index, shellType) =>
case ShowCompletions(index, _) =>
envs.flatMap { envMap =>
val compWords = envMap.collect {
case (idx, word) if idx.startsWith("COMP_WORD_") =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object Completion {
* 1. The chunk that is strictly before the cursor, and
* 2. The chunk that is at or after the cursor.
*/
val (beforeCursor, afterCursor) = words.splitAt(index)
val (beforeCursor, _) = words.splitAt(index)

/*
* Uncluster any flags that are clustered. For example:
Expand Down Expand Up @@ -92,7 +92,7 @@ object Completion {
Epsilon
case Options.WithDefault(options, _, _) =>
toRegularLanguage(options).?
case single @ Options.Single(_, _, primType: PrimType.Bool, _) =>
case single @ Options.Single(_, _, _: PrimType.Bool, _) =>
single.names.foldLeft[RegularLanguage](Empty)((lang, name) => lang | StringToken(name))
case single @ Options.Single(_, _, primType, _) =>
val names = single.names.foldLeft[RegularLanguage](Empty)((lang, name) => lang | StringToken(name))
Expand All @@ -112,7 +112,7 @@ object Completion {
}
case Options.Map(value, _) =>
toRegularLanguage(value)
case kv @ Options.KeyValueMap(argumentOption) =>
case Options.KeyValueMap(argumentOption) =>
val optionGrammar = toRegularLanguage(argumentOption)
Permutation(optionGrammar)
}
Expand All @@ -130,7 +130,7 @@ object Completion {
toRegularLanguage(head) ~ toRegularLanguage(tail)
case Args.Variadic(value, minOpt, maxOpt) =>
toRegularLanguage(value).rep(minOpt, maxOpt)
case Args.Map(value, f) =>
case Args.Map(value, _) =>
toRegularLanguage(value)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ object PrimTypeCompletion {
ZIO.succeed(Set.empty)
case PrimType.OffsetTime =>
ZIO.succeed(Set.empty)
case PrimType.Path(PathType.Either | PathType.File, shouldExist, fileSystem) =>
case PrimType.Path(PathType.Either | PathType.File, _, _) =>
compgen.completeFileNames(prefix).map(_.toSet).orDie
case PrimType.Path(PathType.Directory, shouldExist, fileSystem) =>
case PrimType.Path(PathType.Directory, _, _) =>
compgen.completeDirectoryNames(prefix).map(_.toSet).orDie
case PrimType.Period =>
ZIO.succeed(Set.empty)
Expand Down

0 comments on commit e46d398

Please sign in to comment.