forked from VirtusLab/scala-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request VirtusLab#2692 from Gedochao/maintenance/semanticd…
…b-improvements Add a Scala/Java version agnostic option for setting the SemanticDB target root and source root directories
- Loading branch information
Showing
15 changed files
with
455 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
modules/cli/src/main/scala/scala/cli/commands/shared/SemanticDbOptions.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package scala.cli.commands.shared | ||
|
||
import caseapp.* | ||
import com.github.plokhotnyuk.jsoniter_scala.core.* | ||
import com.github.plokhotnyuk.jsoniter_scala.macros.* | ||
|
||
import scala.cli.commands.tags | ||
|
||
case class SemanticDbOptions( | ||
@Hidden | ||
@Tag(tags.should) | ||
@HelpMessage("Generate SemanticDBs") | ||
@Name("semanticdb") | ||
semanticDb: Option[Boolean] = None, | ||
@Hidden | ||
@Tag(tags.should) | ||
@HelpMessage("SemanticDB target root (default to the compiled classes destination directory)") | ||
@Name("semanticdbTargetRoot") | ||
@Name("semanticdbTargetroot") | ||
semanticDbTargetRoot: Option[String] = None, | ||
@Hidden | ||
@Tag(tags.should) | ||
@HelpMessage("SemanticDB source root (default to the project root directory)") | ||
@Name("semanticdbSourceRoot") | ||
@Name("semanticdbSourceroot") | ||
semanticDbSourceRoot: Option[String] = None | ||
) | ||
|
||
object SemanticDbOptions { | ||
implicit lazy val parser: Parser[SemanticDbOptions] = Parser.derive | ||
implicit lazy val help: Help[SemanticDbOptions] = Help.derive | ||
implicit lazy val jsonCodec: JsonValueCodec[SemanticDbOptions] = JsonCodecMaker.make | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.