Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getChangelog task loses pre-formatted text #133

Closed
jzbrooks opened this issue Oct 29, 2022 · 1 comment · Fixed by #166
Closed

getChangelog task loses pre-formatted text #133

jzbrooks opened this issue Oct 29, 2022 · 1 comment · Fixed by #166
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jzbrooks
Copy link

Describe the bug
The getChangelog task isn't correctly handling pre-formated markdown text.

Compare the getChangelog output with the current changelog.

> cat changelog.md 
# Changelog

## [Unreleased]
### Added
- `RedundantCoroutineScopeDetector` warns when a `androidx.lifecycle.LifecycleOwner`, `androidx.lifecycle.ViewModel`, or `android.view.View` implements or has a field assignable to `kotlinx.coroutines.CoroutineScope`.
  Existing scopes are bound to relevant lifecycle events in the system and will prevent coroutines from running past their utility.
  - `LifecycleOwner` should use `lifecycleScope`
  - `Fragment` should use `viewLifecycleOwner.lifecycleScope`,
  - `ViewModel` should use `viewModelScope`
  - `View` should use `findViewTreeLifecycleOwner()?.lifecycleScope`
- `FiniteWhenCasesDetector` warns when `else` is used as a `when` branch when the `when` subject has finite possibilities
  - This detector works best when applied to an app project with `lint.checkDependencies = true` in the app module AGP DSL.
- `ForEachFunctionDetector` reports `forEach` and `forEachIndexed` use and encourages a language for loop replacement
- `SkippedClassLocalOverrideDetector` warns when an explicit super method is called outside of the corresponding override.

### Changed
- Updated build tooling
- Treat lint warnings as errors for issues in this library
- Add spotless

## [1.1.6]
### Changed
- Java version is increased to Java 11

### Fixed
- Multiple build variants are published after upgrading gradle maven publish plugin to [0.19.0](https://github.com/vanniktech/gradle-maven-publish-plugin/blob/master/CHANGELOG.md#version-0190-2022-02-26)
- A NPE in SingleApostropheDetector for atypical resource definitions

[...]

> ./gradlew getChangelog -q --unreleased
## Unreleased

### Added
- - `LifecycleOwner` should use `lifecycleScope`
  - `Fragment` should use `viewLifecycleOwner.lifecycleScope`,
  - `ViewModel` should use `viewModelScope`
  - `View` should use `findViewTreeLifecycleOwner()?.lifecycleScope`
- - This detector works best when applied to an app project with `lint.checkDependencies = true` in the app module AGP DSL.
- `ForEachFunctionDetector` reports `forEach` and `forEachIndexed` use and encourages a language for loop replacement
- `SkippedClassLocalOverrideDetector` warns when an explicit super method is called outside of the corresponding override.

### Changed
- Updated build tooling
- Treat lint warnings as errors for issues in this library
- Add spotless

To Reproduce
Run ./gradlew getChangelog -q --unreleased on https://github.com/Faithlife/AndroidLint

Expected behavior
I expect the output of getChangelog to reflect the input markdown, including pre-formatted text with backticks `.

Environment:

  • OS: macOS 13 & ubuntu 22
  • Gradle Changelog Plugin Version 1.3.1 & 2.0.0
  • Gradle Version 7.5.1
@jzbrooks jzbrooks added the bug Something isn't working label Oct 29, 2022
@hsz hsz added this to the next milestone Oct 29, 2022
@hsz hsz self-assigned this Oct 29, 2022
@JojOatXGME
Copy link
Contributor

This ticket and the newer ticket #147 look like they probably have the same root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants