Skip to content

Commit

Permalink
reverted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nulls committed Nov 16, 2023
1 parent 9f49b39 commit 02d687b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ abstract class DiktatCheckTask @Inject constructor(
*/
fun Project.registerDiktatCheckTask(
diktatExtension: DiktatExtension,
patternSet: PatternSet,
patternSet: PatternSet
): TaskProvider<DiktatCheckTask> =
tasks.register(
DiktatGradlePlugin.DIKTAT_CHECK_TASK, DiktatCheckTask::class.java,
diktatExtension, patternSet,
diktatExtension, patternSet
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import javax.inject.Inject
*/
abstract class DiktatFixTask @Inject constructor(
extension: DiktatExtension,
inputs: PatternFilterable,
inputs: PatternFilterable
) : DiktatTaskBase(extension, inputs) {
override fun doRun(
runner: DiktatRunner,
Expand All @@ -32,11 +32,11 @@ abstract class DiktatFixTask @Inject constructor(
*/
fun Project.registerDiktatFixTask(
diktatExtension: DiktatExtension,
patternSet: PatternSet,
patternSet: PatternSet
): TaskProvider<DiktatFixTask> =
tasks.register(
DiktatGradlePlugin.DIKTAT_FIX_TASK, DiktatFixTask::class.java,
diktatExtension, patternSet,
diktatExtension, patternSet
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import com.saveourtool.diktat.util.DiktatProcessorListenerWrapper.Companion.unwr
import com.pinterest.ktlint.cli.reporter.json.JsonReporter
import com.pinterest.ktlint.cli.reporter.plain.PlainReporter
import com.pinterest.ktlint.cli.reporter.sarif.SarifReporter
import org.gradle.api.Action

import org.gradle.api.Project
import org.gradle.testfixtures.ProjectBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,18 @@ abstract class DiktatBaseMojo : AbstractMojo() {
)

val sourceRootDir = mavenProject.basedir.parentFile.toPath()
val reporterArgsList = buildList {
val reporterId = getReporterType()
add(
DiktatReporterCreationArguments(id = getReporterType(), outputStream = getReporterOutput(), sourceRootDir = sourceRootDir.takeIf { reporterId == "sarif" })
)
}
val reporterId = getReporterType()
val reporterArgs = DiktatReporterCreationArguments(
id = reporterId,
outputStream = getReporterOutput(),
sourceRootDir = sourceRootDir.takeIf { reporterId == "sarif" },
)
val args = DiktatRunnerArguments(
configInputStream = configFile.inputStream(),
sourceRootDir = sourceRootDir,
files = inputs.map(::Path),
baselineFile = baseline?.toPath(),
reporterArgsList = reporterArgsList,
reporterArgsList = listOf(reporterArgs),
)
val diktatRunner = diktatRunnerFactory(args)
val errorCounter = runAction(
Expand Down

0 comments on commit 02d687b

Please sign in to comment.