Skip to content

Commit

Permalink
fix(scaladocs): make sure scaladocs are aligned with actual behavior (s…
Browse files Browse the repository at this point in the history
…cala#17448)

This change just make sure the actual behavior is aligned with the
comments about plugin options.

refs scala#17238
  • Loading branch information
ckipp01 authored May 19, 2023
1 parent 4ffe5af commit cbf1f18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/plugins/Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sealed trait Plugin {
trait StandardPlugin extends Plugin {
/** Non-research plugins should override this method to return the phases
*
* @param options commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
* @param options commandline options to the plugin.
* @return a list of phases to be added to the phase plan
*/
def init(options: List[String]): List[PluginPhase]
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/dotty/tools/dotc/plugins/Plugins.scala
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ trait Plugins {

/** Add plugin phases to phase plan */
def addPluginPhases(plan: List[List[Phase]])(using Context): List[List[Phase]] = {
// plugin-specific options.
// The user writes `-P:plugname:opt1,opt2`, but the plugin sees `List(opt1, opt2)`.
def options(plugin: Plugin): List[String] = {
def namec = plugin.name + ":"
ctx.settings.pluginOptions.value filter (_ startsWith namec) map (_ stripPrefix namec)
Expand Down

0 comments on commit cbf1f18

Please sign in to comment.