checkstyle / contribution

some useful sources that should not stay in main repo but it is good to host them

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

releasenotes-builder: Update releasenotes-builder to generate content to follow indentation in LI tag

romani opened this issue · comments

We need to updated code to do smart wrap of long lines into few lines with proper indentation.

if that is problem due to template engine we use, so I am ok with post generation processing of result xml.

    <section name="Release 10.4">
      <div class="releaseDate">30.07.2022</div>
      <p>Bug fixes:</p>
        <ul>
          <li>
            MissingJavadocType: Support qualified annotation names.
            Author: stoyanK7
            <a href="https://github.com/checkstyle/checkstyle/issues/11736">#11736</a>
          </li>
          <li>
            Update google_checks.xml to have the SuppressionCommentFilter and
SuppressWarningsHolder modules in the config by default (and by
extension, SuppressWarningsFilter).
            Author: Daniel del Castillo
            <a href="https://github.com/checkstyle/checkstyle/issues/11655">#11655</a>
          </li>
        </ul>
      <p>Notes:</p>

expected:

    <section name="Release 10.3.2">
      <div class="releaseDate">31.07.2022</div>
      <p>Bug fixes:</p>
        <ul>
          <li>
            MissingJavadocType: Support qualified annotation names.
            Author: stoyanK7
            <a href="https://github.com/checkstyle/checkstyle/issues/11736">#11736</a>
          </li>
          <li>
            Update google_checks.xml to have the SuppressionCommentFilter and
            SuppressWarningsHolder modules in the config by default (and by
            extension, SuppressWarningsFilter).
            Author: Daniel del Castillo
            <a href="https://github.com/checkstyle/checkstyle/issues/11655">#11655</a>
          </li>
        </ul>

generated content is violating limit of 100 symbols

@romani Can you add examples? I thought we fixed most issues in #312 . Also not sure if this somehow applies to #364 or what.

I updated description to describe actual problem

@romani Do you want me to write some java code for this or we can do this after the post is created and the shell script focuses on the indentation? I believe shell script can do it more smartly.

Please share your thoughts!

Shell script unlikely make it smart.
Please try to do this in java code of releasenotes builder.

@romani @rnveach I tried some ways but are not satisfactory. Could you please guide me on how to resolve this issue?

In a code where we already do wrap, you need to add indentation spaces to wrapped line, to make it looks indented.

Did you find code that do wrap ?

yes, this code was added for #312
see whole update to see updates in tests - 3a8c112

@romani Doesn't #677 that just got merged solve this issue as well?