From bfa524a4e533f70fc053907cd0c37badbd74527f Mon Sep 17 00:00:00 2001 From: Artur Bosch Date: Mon, 20 Apr 2020 19:27:30 +0200 Subject: [PATCH] Release version 1.8.0 (#2625) * Update release notes script to include notable changes, migration and changelog sub sections * Update release process * Prepare 1.8.0 release * Fix uploading all release assets * Update docs and self analysis detekt version * Fix spelling --- .github/CONTRIBUTING.md | 8 +-- buildSrc/build.gradle.kts | 2 +- buildSrc/src/main/kotlin/Versions.kt | 2 +- buildSrc/src/main/kotlin/releasing.gradle.kts | 8 ++- docs/_config.yml | 2 +- docs/pages/changelog 1.x.x.md | 56 +++++++++++++++++++ scripts/github-milestone-report.groovy | 34 ++++++----- 7 files changed, 85 insertions(+), 27 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0ce3d5175..f4aac3933 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -90,10 +90,10 @@ Following warning is expected until [Jekyll](https://github.com/jekyll/jekyll/is ### Release process - `groovy scripts/github-milestone-report.groovy` - creates changelog -- Increment `detektVersion` in `gradle.properties` -- `gradle build publishToMavenLocal -x detekt -x test` -- `gradle test detekt` +- `gradle increment` +- `gradle build publishToMavenLocal -x detekt -x test` - publish to local first +- `gradle build` - now fully build with tests and self-analysis. - `gradle bintrayUpload` - uploads artifacts to Bintray - `gradle publishPlugins` - uploads the Gradle Plugin to the Plugin Repositories - `gradle githubRelease` - creates a tag for the current version with changelog and cli jar -- Increment `detektAnalysisVersion` in `gradle.properties` to use newest plugin version on CI +- `gradle applyDocVersion applySelfAnalysisVersion` diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 675f32347..adef1cec1 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -14,7 +14,7 @@ repositories { object Plugins { const val KOTLIN = "1.3.72" - const val DETEKT = "1.7.4" + const val DETEKT = "1.8.0" const val GITHUB_RELEASE = "2.2.12" const val ARTIFACTORY = "4.15.1" const val BINTRAY = "1.8.4" diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index eb01a284b..1130036ec 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -1,6 +1,6 @@ object Versions { - const val DETEKT: String = "1.7.4" + const val DETEKT: String = "1.8.0" const val JVM_TARGET: String = "1.8" const val ASSERTJ: String = "3.15.0" const val SPEK: String = "2.0.10" diff --git a/buildSrc/src/main/kotlin/releasing.gradle.kts b/buildSrc/src/main/kotlin/releasing.gradle.kts index fd70f67d1..a1eee0652 100644 --- a/buildSrc/src/main/kotlin/releasing.gradle.kts +++ b/buildSrc/src/main/kotlin/releasing.gradle.kts @@ -18,8 +18,12 @@ githubRelease { changelog.trim() } val cliBuildDir = project(":detekt-cli").buildDir - releaseAssets.setFrom(cliBuildDir.resolve("libs/detekt-cli-${project.version}-all.jar")) - releaseAssets.setFrom(cliBuildDir.resolve("run/detekt")) + releaseAssets.setFrom( + files( + cliBuildDir.resolve("libs/detekt-cli-${project.version}-all.jar"), + cliBuildDir.resolve("run/detekt") + ) + ) } val ln: String = System.lineSeparator() diff --git a/docs/_config.yml b/docs/_config.yml index 6179ec2b0..ad466f7b9 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -110,4 +110,4 @@ description: "Meet detekt, a static code analysis tool for Kotlin." url: http://github.com/arturbosch/detekt baseurl: / -detekt_version: 1.7.4 +detekt_version: 1.8.0 diff --git a/docs/pages/changelog 1.x.x.md b/docs/pages/changelog 1.x.x.md index 42aa2bd94..f6bcab458 100644 --- a/docs/pages/changelog 1.x.x.md +++ b/docs/pages/changelog 1.x.x.md @@ -6,6 +6,62 @@ permalink: changelog.html toc: true --- +#### 1.8.0 + +##### Notable Changes + +- Most rule properties now support yaml lists next to string's with comma-separated-entries. +- Standalone `detekt` executable on GitHub release pages +- New rules: `UnnecessaryNotNullOperator` and `UnnecessarySafeCall` + +##### Migration + +- Formatting rules get reported now on the correct lines. The baseline file may need to be adjusted/regenerated. +- Issues concerning classes and objects are now reported at the identifier. The baseline file may need to be adjusted/regenerated. + +##### Changelog + +- Use yaml lists in our own configuration and tests - [#2623](https://github.com/arturbosch/detekt/pull/2623) +- Run code coverage as an own action - [#2622](https://github.com/arturbosch/detekt/pull/2622) +- Modularize build script by introducing buildSrc module - [#2621](https://github.com/arturbosch/detekt/pull/2621) +- *>excludes allow yaml list - [#2620](https://github.com/arturbosch/detekt/pull/2620) +- Kotlin to 1.3.72 - [#2619](https://github.com/arturbosch/detekt/pull/2619) +- Set failfast to false for pre-merge - [#2618](https://github.com/arturbosch/detekt/pull/2618) +- Update documentation - [#2617](https://github.com/arturbosch/detekt/pull/2617) +- ThrowingExceptionsWithoutMessageOrCause>exceptions allow yaml list - [#2616](https://github.com/arturbosch/detekt/pull/2616) +- SwallowedException>ignoredExceptionTypes allow yaml list - [#2615](https://github.com/arturbosch/detekt/pull/2615) +- ForbiddenPublicDataClass>ignorePackages allow yaml list - [#2614](https://github.com/arturbosch/detekt/pull/2614) +- LabeledExpression>ignoredLabels allow yaml list - [#2613](https://github.com/arturbosch/detekt/pull/2613) +- ForbiddenMethodCall>methods allow yaml list - [#2612](https://github.com/arturbosch/detekt/pull/2612) +- Generate the cli as a stand alone executable - [#2607](https://github.com/arturbosch/detekt/pull/2607) +- Report class and object violations at the identifier - [#2606](https://github.com/arturbosch/detekt/pull/2606) +- Fix formatting line reporting - [#2604](https://github.com/arturbosch/detekt/pull/2604) +- Correct documentation/recommendation of EmptyCatchBlock rule - [#2603](https://github.com/arturbosch/detekt/pull/2603) +- Incorrect (or unclear) EmptyCatchBlock rule - [#2602](https://github.com/arturbosch/detekt/issues/2602) +- Use more lintAndCompile - [#2601](https://github.com/arturbosch/detekt/pull/2601) +- MagicNumber>ignoredNumbers allow yaml list - [#2600](https://github.com/arturbosch/detekt/pull/2600) +- Remove unnecesary symbolic link - [#2598](https://github.com/arturbosch/detekt/pull/2598) +- WildcardImport>excludeImports allow yaml list - [#2596](https://github.com/arturbosch/detekt/pull/2596) +- ForbiddenClassName>forbiddenName allow yaml list - [#2595](https://github.com/arturbosch/detekt/pull/2595) +- Fix false positives in UndocumentedPublicProperty - [#2591](https://github.com/arturbosch/detekt/pull/2591) +- Fix false positive in UndocumentedPublicClass - [#2588](https://github.com/arturbosch/detekt/pull/2588) +- *>*Annotated* allow yaml lists - [#2587](https://github.com/arturbosch/detekt/pull/2587) +- ForbiddenComment>values allow yaml list - [#2585](https://github.com/arturbosch/detekt/pull/2585) +- ExceptionRaisedInUnexpectedLocation>methodNames allow yaml list - [#2584](https://github.com/arturbosch/detekt/pull/2584) +- ComplexMethod>nestingFunctions allow yaml list - [#2583](https://github.com/arturbosch/detekt/pull/2583) +- UndocumentedPublicClass false positive for inner types - [#2580](https://github.com/arturbosch/detekt/issues/2580) +- New Rule: UnnecessaryNotNullOperator - [#2578](https://github.com/arturbosch/detekt/pull/2578) +- New Rule: UnnecessarySafeCall - [#2574](https://github.com/arturbosch/detekt/pull/2574) +- New Rule: UnnecessarySafeCall - [#2572](https://github.com/arturbosch/detekt/issues/2572) +- Add ignoreAnnotated option to LongParameterList - [#2570](https://github.com/arturbosch/detekt/pull/2570) +- Rule configuration request: Ignore based on annotations - [#2563](https://github.com/arturbosch/detekt/issues/2563) +- codecov test coverage report doesn't work correctly - [#2558](https://github.com/arturbosch/detekt/issues/2558) +- Support yaml lists in the configuration values - [#2498](https://github.com/arturbosch/detekt/issues/2498) +- Baseline ignoring MaxLineLength: on 1.0.1 - [#1906](https://github.com/arturbosch/detekt/issues/1906) +- Formatting rules are reported at wrong line (e.g. MaximumLineLength) - [#1843](https://github.com/arturbosch/detekt/issues/1843) + +See all issues at: [1.8.0](https://github.com/arturbosch/detekt/milestone/63) + #### 1.7.4 ##### Notable Changes diff --git a/scripts/github-milestone-report.groovy b/scripts/github-milestone-report.groovy index a0791bd7b..e2816761a 100644 --- a/scripts/github-milestone-report.groovy +++ b/scripts/github-milestone-report.groovy @@ -1,18 +1,15 @@ -@groovy.lang.Grab('org.kohsuke:github-api:1.85') +@groovy.lang.Grab('org.kohsuke:github-api:1.111') import org.kohsuke.github.* -class Report { - static def section(header) { - "#### $header" - } +final class Report { - static def entry(content, issueId, issueUrl) { - "- $content - [#$issueId]($issueUrl)" - } + static def entry(content, issueId, issueUrl) { + "- $content - [#$issueId]($issueUrl)" + } - static def footer(footer, url) { - "See all issues at: [$footer]($url)" - } + static def footer(footer, url) { + "See all issues at: [$footer]($url)" + } } if (args.size() > 3) throw new IllegalArgumentException("Usage: [userId] [repositoryId] [milestoneId]") @@ -29,17 +26,18 @@ def mId = args.size() > 2 ? args[2].toInteger() : sortedMilestones.last().number def milestone = repository.getMilestone(mId) def issues = repository.getIssues(GHIssueState.ALL, milestone) -def section = Report.section(milestone.title.trim()) + "\n" -def issuesString = issues.collect { - (Report.entry(it.title.trim(), it.number, it.getHtmlUrl())) -}.join("\n") + "\n" -def footer = Report.footer(milestone.title.trim(), milestone.getHtmlUrl()) +def header = milestone.title.trim() +def issuesString = issues.collect { (Report.entry(it.title.trim(), it.number, it.getHtmlUrl())) }.join("\n") + "\n" +def footer = Report.footer(header, milestone.getHtmlUrl()) -println(section) +println("#### $header\n") +println("##### Notable Changes\n\n") +println("##### Migration\n\n") +println("##### Changelog\n") println(issuesString) println(footer) println() def tempFile = File.createTempFile(repo, "_$milestone.title") -tempFile.write("$section\n$issuesString\n$footer") +tempFile.write("${("#### ${header}" + "\n")}\n$issuesString\n$footer") println("Content saved to $tempFile.path")