-
Notifications
You must be signed in to change notification settings - Fork 1
Code Style and Formatting
To run Spotless's gradle tasks, navigate to the root directory of the project first: (Note: the syntax may be slightly different depending on your environment)
- To run/validate the project:
./gradlew spotlessCheck
- To automatically apply all non-error linting:
./gradlew spotlessApply
This project defers to many of the default configurations of Spotless for linting and styling, but also adheres to Google's Android coding standards as well.
kdoc annotations are very similar to javadoc annotations.
-
@param name
Documents a value parameter of a function or a type parameter of a class, property or function. Two acceptable syntaxes are:@param name description
or@param[name] description
-
@return
provides a description of what a method will or can return -
@constructor
primary constructor of a class -
@receiver
the receiver of an extension function -
@property name
Documents the property of a class which has the specified name. This tag can be used for documenting properties declared in the primary constructor, where putting a doc comment directly before the property definition would be awkward. -
@throws class, @exception class
Documents an exception which can be thrown by a method. Since Kotlin does not have checked exceptions, there is also no expectation that all possible exceptions are documented, but you can still use this tag when it provides useful information for users of the class. -
@sample identifier
Embeds the body of the function with the specified qualified name into the documentation for the current element, in order to show an example of how the element could be used. -
@see identifier
will generate a link similar to the {@link} tag, but more in the context of a reference and not inline -
@author
author of the relevant document -
@since
specifies which version the class, field, or method was added to the project -
@Deprecated
gives an explanation of why code was deprecated, when it may have been deprecated, and what the alternatives are -
@suppress
Excludes the element from the generated documentation. Can be used for elements which are not part of the official API of a module but still have to be visible externally.
To manually generate a new version of the library's documentation, simply navigate to the root directory of the project and run: ./gradlew dokkaHtml