rules


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.github.tanishiking
ArtifactId

ArtifactId

scalafix-check-scaladoc_2.12
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

rules
rules
Project URL

Project URL

https://github.com/tanishiking/scalafix-check-scaladoc
Project Organization

Project Organization

com.github.tanishiking
Source Code Management

Source Code Management

https://github.com/tanishiking/scalafix-check-scaladoc

Download scalafix-check-scaladoc_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.tanishiking/scalafix-check-scaladoc_2.12/ -->
<dependency>
    <groupId>com.github.tanishiking</groupId>
    <artifactId>scalafix-check-scaladoc_2.12</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.tanishiking/scalafix-check-scaladoc_2.12/
implementation 'com.github.tanishiking:scalafix-check-scaladoc_2.12:0.0.2'
// https://jarcasting.com/artifacts/com.github.tanishiking/scalafix-check-scaladoc_2.12/
implementation ("com.github.tanishiking:scalafix-check-scaladoc_2.12:0.0.2")
'com.github.tanishiking:scalafix-check-scaladoc_2.12:jar:0.0.2'
<dependency org="com.github.tanishiking" name="scalafix-check-scaladoc_2.12" rev="0.0.2">
  <artifact name="scalafix-check-scaladoc_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.tanishiking', module='scalafix-check-scaladoc_2.12', version='0.0.2')
)
libraryDependencies += "com.github.tanishiking" % "scalafix-check-scaladoc_2.12" % "0.0.2"
[com.github.tanishiking/scalafix-check-scaladoc_2.12 "0.0.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.7
ch.epfl.scala : scalafix-core_2.12 jar 0.9.0

Project Modules

There are no modules declared in this project.

scalafix-check-scaladoc

scalafix-check-scaladoc is a custom scalafix lint rule that examines scaladoc comments on classes, methods, values, type definitions, and so on. It complains if they are visible from scalafix-check-scaladoc (it examines only public APIs by default) and are missing scaladoc comments.

Installation

To permanently install the rule for a build, users can add the dependency to build.sbt by updating scalafixDependencies in ThisBuild.

// build.sbt
scalafixDependencies in ThisBuild +=
  "com.github.tanishiking" %% "scalafix-check-scaladoc" % "0.0.2"

Now CheckScaladoc is available.

// sbt shell
> scalafix CheckScaladoc

or configure in .scalafix.conf

rules = [
  CheckScaladoc
]
CheckScaladoc.files = ["src/main/scala/path/to/target/dir"]

and run > scalafix (on sbt shell).

Examples

MyCode.scala:45:1: error: [CheckScaladoc] case object Test doesn't have scaladoc
[error] case object Test
[error] ^^^^^^^^^^^^^^^^
/** This object won't be complained because it has a scaladoc comment
  */
object Test {
  val value = 1 // this will be complained because it doesn't have scaladoc comment

  /** This won't be complained
    */
  var valueWithScaladoc = 1

  // this won't be complained even though it doesn't have scaladoc comment
  // because privateVal is private and scalafix-check-scaladoc examines
  // only on public APIs.
  private val privateVal = 1
}

Configuration

Name Description Default
access Access modifier that allow scalafix-check-scaladoc to lint the API. For example, if access=protected, scalafix-check-scladoc examines on public or protected APIs. public
files Files or dictionaries to lint []
requireDocOnInherited If requireDocOnInherited=true, scalafix-check-scaladoc will examines on inherited methods. false

Versions

Version
0.0.2
0.0.1