Skip to content

Commit

Permalink
Fix javadoc errors
Browse files Browse the repository at this point in the history
Release failed because Javadocs in scalafix-interfaces reported
warnings.
  • Loading branch information
olafurpg committed Aug 9, 2018
1 parent 0fe79b0 commit 63e9122
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
17 changes: 12 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ inThisBuild(

noPublish

// force javac to fork by setting javaHome to get error messages during compilation,
// see https://github.com/sbt/zinc/issues/520
def inferJavaHome() =
Some(file(System.getProperty("java.home")).getParentFile)

lazy val interfaces = project
.in(file("scalafix-interfaces"))
.settings(
javaHome.in(Compile) := {
// force javac to fork by setting javaHome to get error messages during compilation,
// see https://github.com/sbt/zinc/issues/520
Some(file(sys.props("java.home")).getParentFile)
},
javacOptions.in(Compile) ++= List(
"-Xlint:all",
"-Werror"
),
javacOptions.in(Compile, doc) := List("-Xdoclint:none"),
javaHome.in(Compile) := inferJavaHome(),
javaHome.in(Compile, doc) := inferJavaHome(),
moduleName := "scalafix-interfaces",
crossVersion := CrossVersion.disabled,
crossScalaVersions := List(scala212),
Expand Down
1 change: 1 addition & 0 deletions project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
commands += Command.command("ci-212") { s =>
"++2.12.6" ::
"unit/test" ::
"interfaces/doc" ::
s
},
commands += Command.command("ci-211") { s =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@ public interface Scalafix {
String mainHelp(int screenWidth);

/**
* @return The release version of the current Scalafix API instance.
* The release version of the current Scalafix API instance.
*/
String scalafixVersion();

/**
* @return The recommended Scalameta version to match the current Scalafix API instance.
* The recommended Scalameta version to match the current Scalafix API instance.
*/
String scalametaVersion();

/**
* @return The exact Scala versions that are supported by the recommended {@link #scalametaVersion()}
* The exact Scala versions that are supported by the recommended {@link #scalametaVersion()}
*/
String[] supportedScalaVersions();

/**
* @return The most recent Scala 2.11 version in {@link #supportedScalaVersions()}
* The most recent Scala 2.11 version in {@link #supportedScalaVersions()}
*/
String scala211();

/**
* @return The most recent Scala 2.12 version in {@link #supportedScalaVersions()}
* The most recent Scala 2.12 version in {@link #supportedScalaVersions()}
*/
String scala212();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* An error occurred while classloading an instance of {@link Scalafix}.
*/
public class ScalafixException extends Exception {
static final long serialVersionUID = 118L;
ScalafixException(String message, Exception cause) {
super(message, cause);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package scalafix.interfaces;

/**
* The logging level at which Scalafix diagnostics are reported.
*/
public enum ScalafixSeverity {
INFO,
WARNING,
Expand Down

0 comments on commit 63e9122

Please sign in to comment.