Skip to content

Conversation

@200Puls
Copy link

@200Puls 200Puls commented Mar 11, 2021

Hi I find your plugin very useful! Thank you very much fo rthe effort.
As I am increasing my usage of conventional commits I'm missing the capability to generate a changelog.
I was about to start implementing this myself when I came across this fork (thanks to @olpapchenko) which adds exactly this missing piece and appears to be very solid.
Would you be open to merge this?

@foo4u
Copy link
Owner

foo4u commented Mar 16, 2021

@200Puls, this looks interesting. I'll try to review it this week. Do you have an example of the generated output?

@olpapchenko
Copy link

olpapchenko commented Mar 16, 2021

@200Puls, this looks interesting. I'll try to review it this week. Do you have an example of the generated output?

Hi @foo4u, i will send you a link with an example

docs: add changelog usage example
@olpapchenko
Copy link

@200Puls, this looks interesting. I'll try to review it this week. Do you have an example of the generated output?

Updated README.MD - now it includes an example of a change log. How do i use the same code format as the project?


sections = sections.stream().filter(Objects::nonNull).collect(Collectors.toList());

return String.format(CHANGELOG_FORMAT, nextVersion, LocalDate.now(), "\n" + String.join("\n", sections));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I detect that this code is problematic. According to the Bad practice (BAD_PRACTICE), FS: Format string should use %n rather than n (VA_FORMAT_STRING_USES_NEWLINE).
This format string includes a newline character (\n). In format strings, it is generally preferable to use %n, which will produce the platform-specific line separator.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lillieMaiBauer, i added a spot bugs plugin to the project.
%n - looks the right thing to do. But i realized this case:

  1. CI server uses Unix based OS with \n line separator - changelog contains \n as a line separator
  2. For some reason we decided to perform release from Windows host - which will replace \n to \r\n in the changelog file
    I am not sure if this is the correct behavior? I can see in many sources that %n should be used, however - is the case described above ok - so we really want to use platform specific separator in generated changelog file?

fix: add spot bugs plugin
@olpapchenko
Copy link

@foo4u Hi, any updates on this?

@olpapchenko
Copy link

@200Puls, this looks interesting. I'll try to review it this week. Do you have an example of the generated output?

@foo4u Hi, any updates?

@fmdaboville
Copy link

Hello, is there updates on this topic ? This looks interesting

@acwilan
Copy link

acwilan commented Oct 4, 2022

@olpapchenko looks like the project has been abandoned since last year. Perhaps you can go on with a fork and this feature? Great work @foo4u and thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants