0
votes

I am using sonar 3.4.1. & using IBM Build forge tool as C.I tool and it is taking 45 mins to complete the entire build process which is not unacceptable as my LOC 18k only.

If i run sonar analysis without build forge for the same project , it is completed within few minutes .

From the sonar logs i can see that it is taking more time while running the PMD section . If i remove some of the jdbc and hibernate based rules, the time taken is getting reduced 20 minutes. what is going on inside PMD anaylsis .

Your question is rather unclear and as such it is very difficult to understand what is going on and so it is impossible to answer to you. Please post your logs, be precise about your findings : which rules did you deactivate ? Precise also the versions of the java and PMD plugin. Finally, the SonarQube version you are using is quite old and as such I would recommend as a first move to upgrade your version of the platform and the java and PMD plugins.benzonico
i have removed these rule : HibernateBasicRule JdbcBasicRule HibernateStmtRule KeepSQLOutOfCode AvoidThrowsSQLException AvoidHardCodeFilePath AvoidMultipleInstanceOf CharInstantiation LoggerHasWrongCategory ParseIntMightThrowNumberFormatException NonMatchingIteratorInstanceMuruganandam P
Please precise the versions you are using. Post a log.benzonico
Sonar 3.4.1 , sonar-pmd-plugin-1.1.jar, java 1.5, and i have disabled the below rules, now pmd analysis completed in few minutes. AvoidHardCodeFilePath AvoidMultipleInstanceOf AvoidSystemExitToTerminate AvoidThrowsSQLException AvoidUsingArraysCopyOf CharInstantiation ParseIntMightThrowNumberFormatException MembersMustBePrivate NonMatchingIteratorInstance Use StringBuilder Insteadof StringBuffer UseBufferForFileOperation UseForEachOrIterator UseLoggingMechanismToPrintException UsePreparedStatementInLoop Basic Hibernate Rules Basic JDBC Rules Hibernate Statement RulesMuruganandam P
Honestly those versions are beginning to get quite old, so I would recommend first to upgrade your versions before spending too much time investigating. ( the version of the pmd plugin you mention is not even tagged on github : github.com/SonarCommunity/sonar-pmd )benzonico