<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:08:53 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-864] Managing Sonarqube exceptions and rule customization</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-864</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;With Sonarcloud,  there are default Quality Profiles for each programming language.  These profiles are referred to as the &apos;Sonar way&apos; and are updated regularly as plugins.   There will be instances when we need to override or customize the default Quality Profiles that are used to analyze FOLIO projects. &lt;/p&gt;</description>
                <environment></environment>
        <key id="79816">FOLIO-864</key>
            <summary>Managing Sonarqube exceptions and rule customization</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="10002" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p3.svg">P3</priority>
                        <status id="3" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/inprogress.png" description="This issue is being actively worked on at the moment by the assignee.">In Progress</status>
                    <statusCategory id="4" key="indeterminate" colorName="yellow"/>
                                    <resolution id="-1">Unresolved</resolution>
                                                        <assignee accountid="5f9abc1eb45b2e007453f423">John Malconian</assignee>
                                                                <reporter accountid="5f9abc1eb45b2e007453f423">John Malconian</reporter>
                                    <labels>
                            <label>ci</label>
                            <label>core</label>
                            <label>devops</label>
                    </labels>
                <created>Wed, 27 Sep 2017 15:35:57 +0000</created>
                <updated>Tue, 15 Jan 2019 11:53:52 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                    <timespent seconds="3600">1 hour</timespent>
                                <comments>
                                                            <comment id="190720" author="5f9abc1eb45b2e007453f423" created="Wed, 27 Sep 2017 15:50:45 +0000"  >&lt;p&gt;I&apos;ve created two Java Quality Profile called &apos;FOLIO Java&apos; based on the default Sonar profile.    It&apos;s not clear to me whether I should create a custom profile for each project or just one for FOLIO.   In other words, if we make exceptions in one project,  should we apply to all other similar projects?     I&apos;m not sure the correct answer to this,  but for now,  I will maintain one custom Quality Profile for all Java projects and do the same for Javascript projects, etc.    &lt;/p&gt;

&lt;p&gt;The &apos;FOLIO Java&apos; profile configured as with the default Sonar profile as its parent.   The advantage to this is that as Sonar updates rules in its default profile, those rules will trickle down into the custom profile.   The disadvantage is that I cannot deactivate specific rules completely.   I can only change their thresholds and priority.  &lt;/p&gt;

&lt;p&gt;Adam has a specific rule he wants to add as an exception to the Okapi project - squid:S1192 &apos;String literals should not be duplicated&apos;.   I&apos;ve changed the priority of the rule from &apos;critical&apos; to &apos;info&apos;.  &lt;/p&gt;</comment>
                                                            <comment id="190725" author="5f9abc1eb45b2e007453f423" created="Wed, 27 Sep 2017 15:54:16 +0000"  >&lt;p&gt;There is no way to change the default Quality Gate in Sonarcloud which consists of &apos;A&apos; ratings for Reliability, Security, and Maintainability and 80% coverage on new code which is a bit of a bummer.   We&apos;d have to install a local instance of Sonarqube in order to customize Quality Gates.  &lt;/p&gt;</comment>
                                                            <comment id="190728" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Thu, 28 Sep 2017 13:57:57 +0000"  >&lt;p&gt;Any way to reduce the required test coverage to 75% or 60% ? It could be increased slowly once we have reached that in most things. Some of the code it impossible to cover in tests, mostly error handling (catch the exception when the second database operation suddenly fails)&lt;/p&gt;</comment>
                                                            <comment id="190732" author="5f9abc1eb45b2e007453f423" created="Thu, 28 Sep 2017 14:09:02 +0000"  >&lt;p&gt;I&apos;ve changed the threshold for  Sonarqube rule squid:S3776: Cognitive Complexity of methods should not be too high from &apos;15&apos; to &apos;30&apos; and downgraded priority from &apos;critical&apos; to &apos;major&apos; in the Sonarqube FOLIO Java quality profile.   Should be enough not fail anything.   Let&apos;s see how it works out. &lt;/p&gt;</comment>
                                                            <comment id="190735" author="5f9abc1eb45b2e007453f423" created="Thu, 28 Sep 2017 14:25:35 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=712020%3A38d1a08f-86a8-4df2-9191-239b16b0a81a&quot; class=&quot;user-hover&quot; rel=&quot;712020:38d1a08f-86a8-4df2-9191-239b16b0a81a&quot; data-account-id=&quot;712020:38d1a08f-86a8-4df2-9191-239b16b0a81a&quot; accountid=&quot;712020:38d1a08f-86a8-4df2-9191-239b16b0a81a&quot; rel=&quot;noreferrer&quot;&gt;Heikki Levanto&lt;/a&gt; - Unfortunately,  custom Quality Gates (where test coverage is defined) cannot be customized in the hosted version of Sonarqube (Sonarcloud) at this time.  &lt;/p&gt;</comment>
                                                            <comment id="190738" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Thu, 28 Sep 2017 14:37:09 +0000"  >&lt;p&gt;The thing with cognitive complexity seems too strict. Vertx requires a more complex code. Could we up the limit from 15 to 25? And maybe reduce it to a warning, for now.&lt;/p&gt;
</comment>
                                                            <comment id="190744" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Thu, 19 Oct 2017 12:21:03 +0000"  >&lt;p&gt;i would like the following also reduced to a warning:&lt;/p&gt;

&lt;p&gt;Extract this nested try block into a separate method.&lt;br/&gt;
it seems legit to me to have nested try / catch clauses , especially in a non-blocking vertx type env. for example:&lt;/p&gt;


&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;    try {
      vertxContext.runOnContext(v -&amp;gt; {
        try {
          PostgresClient postgresClient = PostgresClient.getInstance(vertxContext.owner(),
              TenantTool.calculateTenantId(tenantId));

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
</comment>
                                                            <comment id="190748" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Thu, 19 Oct 2017 12:24:59 +0000"  >&lt;p&gt;also,  when rmb instantiates a class to use in order to call an implemented meathod, it allows the class to implement a constructor for some minor bootstraping. the constructor contains a vertx and a tenantid parameter - but the implementing class can refer to either both or just one of the arguments - so the rule&lt;/p&gt;

&lt;p&gt;Remove this unused method parameter &quot;vertx&quot;.&lt;/p&gt;

&lt;p&gt;is problematic as well&lt;/p&gt;</comment>
                                                            <comment id="190751" author="5ee89462f7aa140abd82d11d" created="Fri, 2 Feb 2018 16:32:48 +0000"  >&lt;p&gt;@shale99: &quot;Extract this nested try block into a separate method.&quot; should not be reduced to a warning. This mainly pops up in org/folio/rest/impl/*API.java files. Use&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;@SuppressWarnings(&quot;squid:S1141&quot;)  // suppress &quot;Extract this nested try block into a separate method.&quot;
public class MaterialTypeAPI implements MaterialTypesResource {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;in those files so that this error can be dealt with on an individual basis in all other files.&lt;/p&gt;</comment>
                                                            <comment id="190756" author="5ee89462f7aa140abd82d11d" created="Fri, 2 Feb 2018 16:44:39 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=712020%3A32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; class=&quot;user-hover&quot; rel=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; data-account-id=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; accountid=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; rel=&quot;noreferrer&quot;&gt;shale99&lt;/a&gt; The error/warning &quot;Remove this unused method parameter&quot; can be disabled on a case-by-case basis:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  @SuppressWarnings(&quot;squid:S1172&quot;)  // suppress &quot;Remove these unused method parameters.&quot;
  public FixedDueDateSchedulesAPI(Vertx vertx, String tenantId) {
    if(schema == null){
      initCQLValidation();
    }
  }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The rule should remain enabled by default in sonar so that the likely programming error is flagged in all other places.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="79562">FOLIO-1049</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|hzy05j:</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>Thu, 28 Sep 2017 13:57:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>