<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:18:25 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[FOLIO-2127] Decision: Switch to Google Java style guide?</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-2127</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;The &lt;a href=&quot;https://google.github.io/styleguide/javaguide.html&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;Google Java style guide&lt;/a&gt; is modern and maintained and is supported out of the box by check style, which could make it easier to be consistent. This issue is about making the decision whether we want to make the change from sun coding style to google coding style.&lt;/p&gt;

&lt;p&gt;FOLIO&apos;s current coding style: &lt;a href=&quot;https://dev.folio.org/guidelines/contributing/#coding-style&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://dev.folio.org/guidelines/contributing/#coding-style&lt;/a&gt;&lt;br/&gt;
RMB&apos;s existing checkstyle configuration: &lt;a href=&quot;https://github.com/folio-org/raml-module-builder/blob/master/codestyles.xml&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/raml-module-builder/blob/master/codestyles.xml&lt;/a&gt; , &lt;a href=&quot;https://github.com/folio-org/raml-module-builder/blob/master/codestyles-suppressions.xml&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/raml-module-builder/blob/master/codestyles-suppressions.xml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Checkstyle supports both styles:&lt;br/&gt;
&lt;a href=&quot;https://checkstyle.sourceforge.io/sun_style.html&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://checkstyle.sourceforge.io/sun_style.html&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://checkstyle.sourceforge.io/google_style.html&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://checkstyle.sourceforge.io/google_style.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have a SonarCloud Java configuration: &lt;a href=&quot;https://sonarcloud.io/organizations/folio-org/rules?languages=java&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://sonarcloud.io/organizations/folio-org/rules?languages=java&lt;/a&gt;&lt;br/&gt;
Some code style convention rules are enabled, many are disabled but we can enable them. IDEs support Sonar, and most back-end modules have a SonarCloud report on each pull request.&lt;/p&gt;</description>
                <environment></environment>
        <key id="81344">FOLIO-2127</key>
            <summary>Decision: Switch to Google Java style guide?</summary>
                <type id="10003" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium">Task</type>
                                            <priority id="10005" iconUrl="https://dev.folio.org/assets/jira-priority/tbd.svg">TBD</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Won&apos;t Do</resolution>
                                                        <assignee accountid="-1">Unassigned</assignee>
                                                                <reporter accountid="63e2a2771b13d42998e4e706">Marc Johnson</reporter>
                                    <labels>
                            <label>potential-decision</label>
                            <label>tech-debt</label>
                    </labels>
                <created>Fri, 28 Jun 2019 14:58:14 +0000</created>
                <updated>Wed, 25 Jan 2023 14:39:52 +0000</updated>
                            <resolved>Wed, 25 Jan 2023 14:39:52 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                <comments>
                                                            <comment id="196111" author="70121:e70f578f-dc5a-4a30-8836-fc2418025d21" created="Fri, 28 Jun 2019 19:29:26 +0000"  >&lt;p&gt;Here are some pros/cons for this. The Google style guide is similar to our existing Java style. One way to enforce this is by using the maven-checkstyle-plugin in the pom file. A simple example is:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.maven.plugins&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;maven-checkstyle-plugin&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;3.0.0&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;executions&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;execution&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;goals&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;goal&amp;gt;&lt;/span&gt;check&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/goal&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/goals&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/execution&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/executions&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;configLocation&amp;gt;&lt;/span&gt;google_checks.xml&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/configLocation&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;linkXRef&amp;gt;&lt;/span&gt;false&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/linkXRef&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;violationSeverity&amp;gt;&lt;/span&gt;warning&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/violationSeverity&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;includeTestSourceDirectory&amp;gt;&lt;/span&gt;true&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/includeTestSourceDirectory&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;sourceDirectories&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;sourceDirectory&amp;gt;&lt;/span&gt;${project.build.sourceDirectory}&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/sourceDirectory&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;sourceDirectory&amp;gt;&lt;/span&gt;${project.build.testSourceDirectory}&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/sourceDirectory&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/sourceDirectories&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;com.puppycrawl.tools&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;checkstyle&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;8.18&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In the above configuration, the sourceDirectories config is to ignore the RMB generated code, since it does not conform. If RMB could generate compliant code, this could be removed. This will use a built in google_checks.xml file, but that may be too restrictive for modules and exceptions may need to be made.&lt;/p&gt;

&lt;p&gt;For example, Google requires at most 1 capital letter in a row in method names, variables, etc., and in the edge-sip2 module we had cases where we needed multiple uppercase letters in a row. To overcome this, we provided a custom google_checks.xml stored in the project as &quot;&lt;a href=&quot;https://github.com/folio-org/edge-sip2/blob/master/checkstyle.xml&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;checkstyle.xml&lt;/a&gt;&quot; that has a white list of allowed abbreviations. In the pom, we reference &quot;checkstyle.xml&quot; in the configLocation. The obvious downside here is that if improvements are made to the original google_checks.xml file, then they&apos;d need to be discovered somehow and then merged in manually. Checkstyle does not support inheritance or custom overrides at this point, just suppressions (which can be too extreme) or elaborate pom file hacks to get around this.&lt;/p&gt;

&lt;p&gt;Eclipse has a plugin for checkstyle that works reasonably well. It can use a custom checkstyle.xml file as well. Other IDEs probably have reasonable support for checkstyle.&lt;/p&gt;

&lt;p&gt;The key here is that the build will fail if there is a violation. In existing projects, we may not want to fail on a violation since there may be thousands that need to be corrected. But the ultimate goal should be to fail the build if there is a violation. Most common violations will likely be import ordering, exceeding max line length, incorrect indentation, acronyms in method/variable/class names, and missing javadoc for public methods.&lt;/p&gt;

&lt;p&gt;Of course, we could come up with our own style or use the Sun Java style, but each of those has drawbacks. Coming up with our own style takes time and will be frustrating to come to consensus. The Sun Java style has a lot of restrictions that we don&apos;t comply with, far more than the google style, which would lead to more violations that need to be fixed.&lt;/p&gt;</comment>
                                                            <comment id="196112" author="63e2a2771b13d42998e4e706" created="Thu, 5 Mar 2020 13:34:29 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ab8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; class=&quot;user-hover&quot; rel=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; data-account-id=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; accountid=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; rel=&quot;noreferrer&quot;&gt;Jakub Skoczen&lt;/a&gt; &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5cf6c546b87c300f36eb7b9a&quot; class=&quot;user-hover&quot; rel=&quot;5cf6c546b87c300f36eb7b9a&quot; data-account-id=&quot;5cf6c546b87c300f36eb7b9a&quot; accountid=&quot;5cf6c546b87c300f36eb7b9a&quot; rel=&quot;noreferrer&quot;&gt;Craig McNally&lt;/a&gt; &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3Ae70f578f-dc5a-4a30-8836-fc2418025d21&quot; class=&quot;user-hover&quot; rel=&quot;70121:e70f578f-dc5a-4a30-8836-fc2418025d21&quot; data-account-id=&quot;70121:e70f578f-dc5a-4a30-8836-fc2418025d21&quot; accountid=&quot;70121:e70f578f-dc5a-4a30-8836-fc2418025d21&quot; rel=&quot;noreferrer&quot;&gt;Matt Reno&lt;/a&gt; As I understand it, the tech-leads agreed to trial adoption of the Google Java Code Style within mod-circulation. Is that a sensible recollection?&lt;/p&gt;</comment>
                                                            <comment id="196113" author="70121:e70f578f-dc5a-4a30-8836-fc2418025d21" created="Thu, 5 Mar 2020 13:37:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=63e2a2771b13d42998e4e706&quot; class=&quot;user-hover&quot; rel=&quot;63e2a2771b13d42998e4e706&quot; data-account-id=&quot;63e2a2771b13d42998e4e706&quot; accountid=&quot;63e2a2771b13d42998e4e706&quot; rel=&quot;noreferrer&quot;&gt;Marc Johnson&lt;/a&gt; I believe that is correct.&lt;/p&gt;</comment>
                                                            <comment id="196114" author="5cf6c546b87c300f36eb7b9a" created="Mon, 9 Mar 2020 19:54:23 +0000"  >&lt;p&gt;I don&apos;t remember that conversation but it seems fine to me.&lt;/p&gt;</comment>
                                                            <comment id="196115" author="63e2a2771b13d42998e4e706" created="Fri, 20 Mar 2020 16:43:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A89dc6567-baed-429c-bebb-dfcc7e5dcc50&quot; class=&quot;user-hover&quot; rel=&quot;557058:89dc6567-baed-429c-bebb-dfcc7e5dcc50&quot; data-account-id=&quot;557058:89dc6567-baed-429c-bebb-dfcc7e5dcc50&quot; accountid=&quot;557058:89dc6567-baed-429c-bebb-dfcc7e5dcc50&quot; rel=&quot;noreferrer&quot;&gt;Bohdan Suprun&lt;/a&gt; has prepared a branch for trying out the checkstyle Google code style (see 
    &lt;span class=&quot;jira-issue-macro&quot; data-jira-key=&quot;CIRC-619&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/CIRC-619&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Use check style to validate google code style&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium&quot; /&gt;
            CIRC-619
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-complete jira-macro-single-issue-export-pdf&quot;&gt;Blocked&lt;/span&gt;
            &lt;/span&gt;
).&lt;/p&gt;

&lt;p&gt;In that branch, it includes some customisations to the style:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Do not require comment for a public method&lt;/li&gt;
	&lt;li&gt;Use Eclipse import order rule&lt;/li&gt;
	&lt;li&gt;Use 2 space indentation (to align with the current standard)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;As &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3Ae70f578f-dc5a-4a30-8836-fc2418025d21&quot; class=&quot;user-hover&quot; rel=&quot;70121:e70f578f-dc5a-4a30-8836-fc2418025d21&quot; data-account-id=&quot;70121:e70f578f-dc5a-4a30-8836-fc2418025d21&quot; accountid=&quot;70121:e70f578f-dc5a-4a30-8836-fc2418025d21&quot; rel=&quot;noreferrer&quot;&gt;Matt Reno&lt;/a&gt; states above, there are trade offs to us defining our own style.&lt;/p&gt;

&lt;p&gt;Do we want to make these amendments to the style, and maintain a FOLIO custom style?&lt;/p&gt;</comment>
                                                            <comment id="196116" author="70121:e70f578f-dc5a-4a30-8836-fc2418025d21" created="Fri, 20 Mar 2020 17:29:50 +0000"  >&lt;ul&gt;
	&lt;li&gt;I actually prefer the line wrapping indentation of 4. Then again, I wasn&apos;t aware that line wrapping indentation was 2 for FOLIO. I believe I always used 4 in my code for line wrapping. Yup, just confirmed I used a line wrap indentation of 4 with some files I created in mod-circulation.&lt;/li&gt;
	&lt;li&gt;I could go either way with the import order. I actually don&apos;t mind alphabetical order (google) vs grouped alphabetical order (eclipse).&lt;/li&gt;
	&lt;li&gt;The public method comments only apply to methods that are over a certain amount of lines (maybe 2?), but I can see that being tedious to fill in existing missing methods even though I think some doc may be helpful to consumers of those public methods.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;My 2 cents, for what it&apos;s worth, would be we stick with vanilla style so most projects can just use the latest style file provided by the maven plugin (no project local checkstyle file). If there is a reason that we need to tweak the file, we can do that on a project by project basis.&lt;/p&gt;</comment>
                                                            <comment id="196117" author="5ee89462f7aa140abd82d11d" created="Mon, 23 Mar 2020 09:18:23 +0000"  >&lt;p&gt;Can someone explain whether this issue is also about switching from Sonarcloud and SonarLint to Checkstyle?&lt;br/&gt;
FOLIO&apos;s SonarQube/SonarCloud/SonarLint documentation: &lt;a href=&quot;https://dev.folio.org/guides/code-analysis/#sonarqube&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://dev.folio.org/guides/code-analysis/#sonarqube&lt;/a&gt;&lt;br/&gt;
FOLIO&apos;s current Sonar configuration: &lt;a href=&quot;https://sonarcloud.io/organizations/folio-org/quality_profiles/show?language=java&amp;amp;name=FOLIO+Java+Way&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://sonarcloud.io/organizations/folio-org/quality_profiles/show?language=java&amp;amp;name=FOLIO+Java+Way&lt;/a&gt;&lt;br/&gt;
IDE (IntelliJ, Eclipse, Visual Studio Code) Sonar plugin: &lt;a href=&quot;https://www.sonarlint.org/&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://www.sonarlint.org/&lt;/a&gt;&lt;/p&gt;</comment>
                                                            <comment id="196118" author="63e2a2771b13d42998e4e706" created="Mon, 23 Mar 2020 13:41:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5ee89462f7aa140abd82d11d&quot; class=&quot;user-hover&quot; rel=&quot;5ee89462f7aa140abd82d11d&quot; data-account-id=&quot;5ee89462f7aa140abd82d11d&quot; accountid=&quot;5ee89462f7aa140abd82d11d&quot; rel=&quot;noreferrer&quot;&gt;Julian Ladisch&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Can someone explain whether this issue is also about switching from Sonarcloud and SonarLint to Checkstyle?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That is an excellent question, thank you for asking.&lt;/p&gt;

&lt;p&gt;I run the Sonar plugin in IntelliJ using the SonarQube configuration, and I find it useful for not having to wait for CI.&lt;/p&gt;

&lt;p&gt;I think CheckStyle was suggested during a retrospective following concerns around the amount of time during pull requests spent advising on formatting issues.&lt;/p&gt;

&lt;p&gt;As I understand it, the current Sonar configuration does not check indentation, import ordering, expression and line formatting etc.&lt;/p&gt;

&lt;p&gt;If Sonar can provide static analysis for formatting, import order etc and that can run locally in a maven build, then that is great and preferable to introducing new tools.&lt;/p&gt;</comment>
                                                            <comment id="196119" author="5ee89462f7aa140abd82d11d" created="Mon, 23 Mar 2020 15:40:32 +0000"  >&lt;p&gt;The current maintainer of checkstyle romani says about checkstyle&apos;s indentation check:&lt;br/&gt;
&quot;we cannot even maintain Check in current state , too much bugs in it, so making it even more complicated it not doable. We can come back to this idea after we fix all existing problems in this Check.&quot; &lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/3342#issuecomment-502492718&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/3342#issuecomment-502492718&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Java Lambdas are supported by the autoindent feature of IDEs like IntelliJ and Eclipse, but not by checkstyle.&lt;br/&gt;
Checkstyle incorrectly says that the second lambda of this code example from &lt;a href=&quot;https://vertx.io/docs/vertx-core/java/#blocking_code&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://vertx.io/docs/vertx-core/java/#blocking_code&lt;/a&gt; needs more indentation:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
vertx.executeBlocking(promise -&amp;gt; {
  &lt;span class=&quot;code-comment&quot;&gt;// Call some blocking API that takes a significant amount of time to &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt;
&lt;/span&gt;  &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; result = someAPI.blockingMethod(&lt;span class=&quot;code-quote&quot;&gt;&quot;hello&quot;&lt;/span&gt;);
  promise.complete(result);
}, res -&amp;gt; {
  &lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;.out.println(&lt;span class=&quot;code-quote&quot;&gt;&quot;The result is: &quot;&lt;/span&gt; + res.result());
});
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;List of indentation issues related to lambdas:  &lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/3182&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/3182&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/3342&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/3342&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/3415&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/3415&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/4006&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/4006&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/4638&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/4638&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/5969&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/5969&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/6106&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/6106&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/issues/7675&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/issues/7675&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/checkstyle/checkstyle/pull/7899&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/checkstyle/checkstyle/pull/7899&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sonar has this Java indentation rule: &lt;a href=&quot;https://sonarcloud.io/organizations/folio-org/rules?open=java%3AS1120&amp;amp;rule_key=java%3AS1120&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://sonarcloud.io/organizations/folio-org/rules?open=java%3AS1120&amp;amp;rule_key=java%3AS1120&lt;/a&gt;&lt;br/&gt;
It is disabled but it can easily been enabled.&lt;/p&gt;

&lt;p&gt;Sonar currently does not support enforcing import order for the reasons explained in&lt;br/&gt;
&lt;a href=&quot;https://community.sonarsource.com/t/java-check-orderings-of-imports/17302&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://community.sonarsource.com/t/java-check-orderings-of-imports/17302&lt;/a&gt;&lt;br/&gt;
We may contribute code to sonar to add a default Eclipse import order check.&lt;br/&gt;
We may use checkstyle for only the import order check and use sonar otherwise.&lt;br/&gt;
The checkstyle configuration to match default Eclipse formatter configuration for Eclipse Mars onwards is on&lt;br/&gt;
&lt;a href=&quot;https://checkstyle.sourceforge.io/config_imports.html#ImportOrder_Examples&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://checkstyle.sourceforge.io/config_imports.html#ImportOrder_Examples&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Sonar has 48 convention and style rules for Java we can pick from:&lt;br/&gt;
&lt;a href=&quot;https://sonarcloud.io/organizations/folio-org/rules?languages=java&amp;amp;tags=convention%2Cstyle&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://sonarcloud.io/organizations/folio-org/rules?languages=java&amp;amp;tags=convention%2Cstyle&lt;/a&gt;&lt;br/&gt;
Which expression and line formatting rules are missing?&lt;/p&gt;

&lt;p&gt;To run Sonar locally in a maven build use &lt;a href=&quot;https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/&lt;/a&gt;&lt;/p&gt;</comment>
                                                            <comment id="196120" author="5ee89462f7aa140abd82d11d" created="Mon, 23 Mar 2020 17:26:52 +0000"  >&lt;p&gt;Google code style suggests to use an enum without default when listing all enum values: &lt;a href=&quot;https://google.github.io/styleguide/javaguide.html#s4.8.4.3-switch-default&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://google.github.io/styleguide/javaguide.html#s4.8.4.3-switch-default&lt;/a&gt;&lt;br/&gt;
This is checked by sonar: &lt;a href=&quot;https://sonarcloud.io/organizations/folio-org/rules?open=java%3AS131&amp;amp;rule_key=java%3AS131&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://sonarcloud.io/organizations/folio-org/rules?open=java%3AS131&amp;amp;rule_key=java%3AS131&lt;/a&gt;&lt;br/&gt;
The checkstyle rule does not check for enum completeness, is more restrictive than Google code style, doesn&apos;t detect missing enum values and should therefore been disabled: &lt;a href=&quot;https://checkstyle.sourceforge.io/config_coding.html#MissingSwitchDefault&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://checkstyle.sourceforge.io/config_coding.html#MissingSwitchDefault&lt;/a&gt;&lt;/p&gt;</comment>
                                                            <comment id="196121" author="63e2a2771b13d42998e4e706" created="Tue, 24 Mar 2020 16:03:57 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5ee89462f7aa140abd82d11d&quot; class=&quot;user-hover&quot; rel=&quot;5ee89462f7aa140abd82d11d&quot; data-account-id=&quot;5ee89462f7aa140abd82d11d&quot; accountid=&quot;5ee89462f7aa140abd82d11d&quot; rel=&quot;noreferrer&quot;&gt;Julian Ladisch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for researching this.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The current maintainer of checkstyle romani says about checkstyle&apos;s indentation check:&lt;br/&gt;
&quot;we cannot even maintain Check in current state , too much bugs in it, so making it even more complicated it not doable. We can come back to this idea after we fix all existing problems in this Check.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I didn&apos;t know about this, I haven&apos;t tried to use checkstyle much.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Java Lambdas are supported by the autoindent feature of IDEs like IntelliJ and Eclipse, but not by checkstyle.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Alas, a lot of the formatting issues I asked to be changed during pull requests are usually due to an IDE doing it automatically. &lt;/p&gt;

&lt;p&gt;I&apos;m happy for folks to use IDE&apos;s to automatically format code. I don&apos;t think we should rely on it, and would prefer a tool that can be used in the automated build process.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Sonar has this Java indentation rule. It is disabled but it can easily been enabled.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Do you know why it is turned off currently?&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Sonar currently does not support enforcing import order&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That&apos;s a shame&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We may use checkstyle for only the import order check and use sonar otherwise.&lt;br/&gt;
The checkstyle configuration to match default Eclipse formatter configuration for Eclipse Mars onwards is on&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This would seem to act against the goal of not introducing another tool :-/&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Which expression and line formatting rules are missing?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I&apos;m mostly interested in function parameters spanning more than one line, that seems to be incorrectly formatted a lot.&lt;/p&gt;</comment>
                                                            <comment id="196122" author="5f8314dfbdef80006f6f572d" created="Wed, 25 Mar 2020 17:34:03 +0000"  >&lt;p&gt;Checkstyle looks like very maintained when you look at the commits. There are many checks that Sonar Qube did not spot.. Perhaps that was just the way we configured Sonar Qube.&lt;/p&gt;

&lt;p&gt;We have only found a minor issue with switch-default-handling.. And indentation of multiple lambdas . Other than that, it seems to work fine.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="54087">OKAPI-809</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="47188">CIRC-619</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="81007">FOLIO-1667</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10057" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Development Team</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10144"><![CDATA[Core: Platform]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzzuzj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 28 Jun 2019 19:29:26 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>