Skip to content

Commit

Permalink
Detekt autoCorrect fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian.panek committed Sep 16, 2019
1 parent 9a41aab commit 407cf8f
Show file tree
Hide file tree
Showing 182 changed files with 202 additions and 197 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ repositories {
}

dependencies {
implementation("com.cognifide.gradle:aem-plugin:7.2.0-SNAPSHOT")
implementation("com.cognifide.gradle:aem-plugin:7.2.0")
}
```

Expand Down Expand Up @@ -1661,7 +1661,7 @@ aem {
}
```

By running task `instanceSatisfy`, provisioner will perform all steps for which conditions are met.
By running task `instanceProvision`, provisioner will perform all steps for which conditions are met.
Specifying condition could be even omitted, then by default each step will be performed only `once()`
which means that configured `action {}` will be executed only once on each AEM instance.

Expand All @@ -1676,7 +1676,7 @@ There are also options for making provisioning more fail-safe, especially when e
Then each step may be additionally configured with:

* `continueOnFail = true` - logging error to console instead of breaking build with exception so that next step might be performed,
* `rerunOnFail = true` - condition `once()` will try to perform step again even when it previously failed. Also affects conditions based on time.
* `rerunOnFail = false` - disabling performing step again when previously failed. Considered only when using condition `once()` (which is alias for `failSafeOnce()`) and other conditions based on time.

#### Task `instanceAwait`

Expand Down
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies {
testImplementation("org.skyscreamer:jsonassert:1.5.0")
testImplementation("org.junit-pioneer:junit-pioneer:0.2.2")

"detektPlugins"("io.gitlab.arturbosch.detekt:detekt-formatting:1.0.0-RC16")
"detektPlugins"("io.gitlab.arturbosch.detekt:detekt-formatting:1.0.1")
}

tasks {
Expand Down Expand Up @@ -142,6 +142,9 @@ tasks {

detekt {
config.from(file("detekt.yml"))
parallel = true
autoCorrect = true
failFast = true
}

apply(from = "gradle/publish.gradle.kts")
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.9.18")
implementation("com.gradle.plugin-publish:com.gradle.plugin-publish.gradle.plugin:0.10.1")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0-RC16")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.1")
implementation("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4")
implementation("com.neva.gradle:fork-plugin:3.1.4")
implementation("net.researchgate:gradle-release:2.6.0")
Expand Down
19 changes: 12 additions & 7 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build:
processors:
active: true
exclude:
# - 'DetektProgressListener'
# - 'FunctionCountProcessor'
# - 'PropertyCountProcessor'
# - 'ClassCountProcessor'
Expand Down Expand Up @@ -184,6 +185,7 @@ formatting:
autoCorrect: true
AnnotationOnSeparateLine:
active: false
autoCorrect: true
ChainWrapping:
active: true
autoCorrect: true
Expand All @@ -193,12 +195,14 @@ formatting:
Filename:
active: true
FinalNewline:
active: false
active: true
autoCorrect: true
ImportOrdering:
active: false
autoCorrect: true
Indentation:
active: false
autoCorrect: true
indentSize: 4
continuationIndentSize: 4
MaximumLineLength:
Expand All @@ -219,8 +223,6 @@ formatting:
NoEmptyClassBody:
active: true
autoCorrect: true
NoItParamInMultilineLambda:
active: false
NoLineBreakAfterElse:
active: true
autoCorrect: true
Expand Down Expand Up @@ -275,9 +277,6 @@ formatting:
SpacingAroundRangeOperator:
active: true
autoCorrect: true
SpacingAroundUnaryOperators:
active: true
autoCorrect: true
StringTemplate:
active: true
autoCorrect: true
Expand Down Expand Up @@ -434,6 +433,7 @@ style:
ForbiddenComment:
active: true
values: 'TODO:,FIXME:,STOPSHIP:'
allowedPatterns: ""
ForbiddenImport:
active: false
imports: ''
Expand Down Expand Up @@ -477,7 +477,7 @@ style:
NestedClassesVisibility:
active: false
NewLineAtEndOfFile:
active: false
active: true
NoTabs:
active: false
OptionalAbstractKeyword:
Expand All @@ -490,6 +490,8 @@ style:
active: false
ProtectedMemberInFinalClass:
active: false
RedundantExplicitType:
active: false
RedundantVisibilityModifierRule:
active: false
ReturnCount:
Expand All @@ -498,6 +500,7 @@ style:
excludedFunctions: "equals"
excludeLabeled: false
excludeReturnFromLambda: true
excludeGuardClauses: false
SafeCast:
active: true
SerialVersionUIDInSerializableClass:
Expand Down Expand Up @@ -537,6 +540,8 @@ style:
UseDataClass:
active: false
excludeAnnotatedClasses: ""
UseIfInsteadOfWhen:
active: false
UseRequire:
active: false
UselessCallOnNotNull:
Expand Down
Binary file modified dists/gradle-aem-tailer.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion dists/gradle-aem-tailer/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ repositories {
}

dependencies {
implementation("com.cognifide.gradle:aem-plugin:7.2.0-SNAPSHOT")
implementation("com.cognifide.gradle:aem-plugin:7.2.0")
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=7.2.0-SNAPSHOT
version=7.2.0
release.useAutomaticVersion=true
2 changes: 1 addition & 1 deletion src/main/kotlin/com/cognifide/gradle/aem/AemDefaultTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ open class AemDefaultTask : DefaultTask(), AemTask {
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/com/cognifide/gradle/aem/AemPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ abstract class AemPlugin : Plugin<Project> {
return project.rootProject.allprojects.filter { it.plugins.hasPlugin(id) }
}
}
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/com/cognifide/gradle/aem/AemTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ interface AemTask : Task {
return File(dir, name)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -459,4 +459,4 @@ val jar: Jar
"scala" to "scala"
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ class BundlePlugin : AemPlugin() {
companion object {
const val ID = "com.cognifide.aem.bundle"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ class CommonPlugin : AemPlugin() {

const val STRUCTURE_PROPERTIES_FILE = "aem.properties"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ object Behaviors {
val ticks: Long
get() = _ticks
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ class BuildScope {
return ext.get(key) as BuildScope
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ class CollectingLogger {
fun info(message: String) = log(LogLevel.INFO, message)

fun info(summary: String, details: String) = log(LogLevel.INFO, details, summary)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ class DependencyOptions {
aem.project.dependencies.add(configuration, notation)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ object Parallel {
fun <A> with(iterable: Iterable<A>, callback: A.() -> Unit) {
map(iterable) { it.apply(callback); Unit }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ class ProgressCountdown(project: Project) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ class ProgressIndicator(private val project: Project) {

return "$indicator ${parts.joinToString(" # ")}".trim()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ open class ProgressLogger private constructor(val project: Project) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ class Retry private constructor(val aem: AemExtension) {

const val SECOND_MILIS = 1000L
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ object FileOperations {
lock(file)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ open class FileWatcher(val aem: AemExtension) {
// do nothing
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ open class FileGroup(val aem: AemExtension, val downloadDir: File, val name: Str
fun resolve(id: String, resolver: (FileResolution) -> File): FileResolution {
return createResolution(id, resolver).apply { _resolutions += this }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ class FileResolver(aem: AemExtension, downloadDir: File) : Resolver<FileGroup>(a
override fun createGroup(name: String): FileGroup {
return FileGroup(aem, downloadDir, name)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ val downloadDir: File
companion object {
const val GROUP_DEFAULT = "default"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ abstract class AbstractFileTransfer(protected val aem: AemExtension) : FileTrans
fun downloader() = FileDownloader(aem)

fun uploader() = FileUploader(aem)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ data class FileEntry(

fun of(file: File): FileEntry = file.run { FileEntry(name, length(), lastModified()) }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ interface FileTransfer {

return dirUrl to fileName
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ class FileTransferFactory(private val aem: AemExtension) {
fun <T> sftp(options: SftpFileTransfer.() -> T) = SftpFileTransfer(aem).run(options)

fun <T> smb(options: SmbFileTransfer.() -> T) = SmbFileTransfer(aem).run(options)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ class FileUploader(private val aem: AemExtension) {

const val KILOBYTE = 1024
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ abstract class ProtocolFileTransfer(aem: AemExtension) : AbstractFileTransfer(ae
override fun handles(fileUrl: String): Boolean {
return !fileUrl.isBlank() && Patterns.wildcard(fileUrl, protocols)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ class UrlFileTransfer(aem: AemExtension) : ProtocolFileTransfer(aem) {
companion object {
const val NAME = "url"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ class HttpFileTransfer(aem: AemExtension, var client: HttpClient = client(aem))
connectionIgnoreSsl = aem.props.boolean("fileTransfer.http.connectionIgnoreSsl") ?: true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ class SmbFileTransfer(aem: AemExtension) : ProtocolFileTransfer(aem) {
companion object {
const val NAME = "smb"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ class PreemptiveAuthInterceptor : HttpRequestInterceptor {
authState.update(BasicScheme(), creds)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class RequestException : AemException {
constructor(message: String, cause: Throwable) : super(message, cause)

constructor(message: String) : super(message)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class ResponseException : AemException {
constructor(message: String, cause: Throwable) : super(message, cause)

constructor(message: String) : super(message)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ abstract class AbstractInstance(
.append(httpUrl)
.toHashCode()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ enum class IdType {

val type: String
get() = name.toLowerCase()
}
}
Loading

0 comments on commit 407cf8f

Please sign in to comment.