Skip to content

Commit

Permalink
Fix detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeNeedham committed May 10, 2024
1 parent 0bae286 commit 8a83fd1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions plugin-build/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
This is the source for the Module Graph Gradle plugin.

# Formatting
The code style of this project is enforced with Ktlint. Run it with:
`./gradlew :plugin-build:modulegraph:ktlintTestSourceSetCheck`
The code style of this project is enforced with Detekt. Run it with:
`./gradlew :plugin-build:modulegraph:detekt`

# Test
This project has extensive unit tests. Run them locally with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ open class ModuleGraphPlugin : Plugin<Project> {
val additionalGraphConfigs = task.graphConfigs.getOrElse(emptyList())
val allGraphConfigs = listOfNotNull(primaryGraphConfig) + additionalGraphConfigs
if (allGraphConfigs.isEmpty()) {
error("No valid graph configs were found! Make sure to set up either the primary graph, or add additional graphs")
error(
"""
No valid graph configs were found!
Make sure to set up either the primary graph, or add additional graphs.
""".trimIndent(),
)
}

val allProjects = project.allprojects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package dev.iurysouza.modulegraph.model
import dev.iurysouza.modulegraph.LinkText
import dev.iurysouza.modulegraph.Orientation
import dev.iurysouza.modulegraph.Theme
import java.io.Serializable

/**
* The config for a single graph to be made.
Expand Down Expand Up @@ -70,7 +69,7 @@ data class GraphConfig(
* the generated graph will only include dependencies (direct and transitive) of root modules.
*/
val rootModulesRegex: String?,
) : Serializable {
) {

class Builder(
/** @see [GraphConfig.readmePath] */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ internal data class GraphParseResult(
val graph: ProjectGraph,
/** The original config provided used to produce [graph] */
val config: GraphConfig,
) : Serializable
)
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ internal val expectedMermaidGraphCode = """
|```
""".trimMargin()

@Suppress("LongParameterList")
internal fun getConfig(
readmePath: String = "",
heading: String = "",
Expand Down

0 comments on commit 8a83fd1

Please sign in to comment.