[sonar-dev] SonarQube Plugins: new custom PL/SQL plugin independent of the SonarQube PL/SQL plugin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] SonarQube Plugins: new custom PL/SQL plugin independent of the SonarQube PL/SQL plugin

Aubacca
This post was updated on .
Dear all,
My company has created a analyzer for PL/SQL code written in java (PlSqlCop) to report any found issues of the analyzed PL/SQL code.
At the moment I am implementing a plugin for SonarQube (languageKey="plsql", repositoryKey="tvdcc-sql") that will use this PlSqlCop program and import the found issues from PlSqlCop program into the SonarQube environment.

When I run the "sonar-runner" on a project, I got the info "EXECUTION FAILURE" because "ERROR: Caused by: No license for plsql" (see execution log below).

C:\workspace\SonarQube\tvdCcResources>sonar-runner
C:\workspace\SonarQube\sonar-runner-2.4
SonarQube Runner 2.4
Java 1.7.0_76 Oracle Corporation (64-bit)
Windows 8.1 6.3 amd64
INFO: Runner configuration file: C:\workspace\SonarQube\sonar-runner-2.4\conf\sonar-runner.properties
INFO: Project configuration file: C:\workspace\SonarQube\tvdCcResources\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: C:\workspace\SonarQube\tvdCcResources\.\.sonar
INFO: SonarQube Server 5.0.1
18:31:32.388 INFO  - Load global referentials...
18:31:32.544 INFO  - Load global referentials done: 156 ms
18:31:32.544 INFO  - User cache: C:\Users\pro\.sonar\cache
18:31:32.560 INFO  - Install plugins
18:31:32.669 INFO  - Install JDBC driver
18:31:32.669 INFO  - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
18:31:33.591 INFO  - Initializing Hibernate
18:31:34.794 INFO  - Load project referentials...
18:31:35.419 INFO  - Load project referentials done: 625 ms
18:31:35.419 INFO  - Load project settings
18:31:35.701 INFO  - Loading technical debt model...
18:31:35.747 INFO  - Loading technical debt model done: 46 ms
18:31:35.747 INFO  - Apply project exclusions
18:31:35.810 WARN  - SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
18:31:35.810 INFO  - -------------  Scan PL/SQL Cop default checks (ex CodeChecker)
18:31:35.810 INFO  - Load module settings
18:31:36.169 INFO  - Loading rules...
18:31:36.560 INFO  - Loading rules done: 391 ms
18:31:36.576 INFO  - Configure Maven plugins
18:31:36.669 INFO  - No quality gate is configured.
18:31:36.794 INFO  - Base dir: C:\workspace\SonarQube\tvdCcResources\.
18:31:36.794 INFO  - Working dir: C:\workspace\SonarQube\tvdCcResources\.\.sonar
18:31:36.794 INFO  - Source paths: src
18:31:36.794 INFO  - Source encoding: UTF-8, default locale: en_US
18:31:36.794 INFO  - Index files
18:31:36.997 INFO  - 80 files indexed
18:31:37.310 INFO  - Quality profile for plsql: PL/SQL Cop Quality Profile
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 5.594s
Final Memory: 52M/736M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: No license for plsql
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

C:\workspace\SonarQube\tvdCcResources>


I did install the "SonarQube PL/SQL plugin" to see in the tab "Quality Profiles" the PL/SQL Profiles section, to which I did assign the Quality Profile for my PL/SQL plugin (PL/SQL ...):
[cid:image003.jpg@01D067F4.ED089C30]


If I do not install the "SonarQube PL/SQL plugin", I am not able the define a PL/SQL Profile because the "PL/SQL Profiles" section is not available and I was not able to see any defined rules on the tab "Rules" for my plugin. When the "SonarQube PL/SQL plugin" was installed I was able to define a Quality Profile and I was able to see all rules for my PL/SQL plugin:
[cid:image005.jpg@01D067F4.ED089C30]


Questions:

1.       How can I make my PL/SQL rules make visible in the SonarQube webapp (tab "Rules"), without having the "SonarQube PL/SQL plugin" installed (languageKey="plsql")? No "LANGUAGES = PL/SQL" filter is visible without the "SonarQube PL/SQL plugin" installed.

2.       How can I define a Quality Profile for PL/SQL (tab "Quality Profile") without the "SonarQube PL/SQL plugin" installed (languageKey="plsql")? No "PL/SQL Profiles" section is visible without the "SonarQube PL/SQL plugin" installed.

3.       How can I run a "sonar-runner" task on a PL/SQL project without using the "SonarQube PL/SQL plugin" and not having problem with no licence for it?


I would greatly appreciate any help on my questions above?

Best Regards
Peter




image003.jpg (180K) <http://sonarqube-archive.15.x6.nabble.com/attachment/5033783/0/image003.jpg>
image005.jpg (242K) <http://sonarqube-archive.15.x6.nabble.com/attachment/5033783/1/image005.jpg>
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] SonarQube Plugins: new custom PL/SQL plugin independent of the SonarQube PL/SQL plugin

Simon Brandhof
Hi,

I suppose that you installed both your and SonarSource PL/SQL plugins. The latter is close-source and requires a commercial license.

Do you confirm that ?
Regards




Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

On 26 March 2015 at 18:44, Peter Rohner <[hidden email]> wrote:

Dear all,

My company has created a analyzer for PL/SQL code written in java (PlSqlCop) to report any found issues of the analyzed PL/SQL code.

At the moment I am implementing a plugin for SonarQube (languageKey=”plsql”, repositoryKey="tvdcc-sql") that will use this PlSqlCop program and import the found issues from PlSqlCop program into the SonarQube environment.

 

When I run the “sonar-runner” on a project, I got the info “EXECUTION FAILURE” because “ERROR: Caused by: No license for plsql” (see execution log below).

 

C:\workspace\SonarQube\tvdCcResources>sonar-runner

C:\workspace\SonarQube\sonar-runner-2.4

SonarQube Runner 2.4

Java 1.7.0_76 Oracle Corporation (64-bit)

Windows 8.1 6.3 amd64

INFO: Runner configuration file: C:\workspace\SonarQube\sonar-runner-2.4\conf\sonar-runner.properties

INFO: Project configuration file: C:\workspace\SonarQube\tvdCcResources\sonar-project.properties

INFO: Default locale: "en_US", source code encoding: "UTF-8"

INFO: Work directory: C:\workspace\SonarQube\tvdCcResources\.\.sonar

INFO: SonarQube Server 5.0.1

18:31:32.388 INFO  - Load global referentials...

18:31:32.544 INFO  - Load global referentials done: 156 ms

18:31:32.544 INFO  - User cache: C:\Users\pro\.sonar\cache

18:31:32.560 INFO  - Install plugins

18:31:32.669 INFO  - Install JDBC driver

18:31:32.669 INFO  - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar

18:31:33.591 INFO  - Initializing Hibernate

18:31:34.794 INFO  - Load project referentials...

18:31:35.419 INFO  - Load project referentials done: 625 ms

18:31:35.419 INFO  - Load project settings

18:31:35.701 INFO  - Loading technical debt model...

18:31:35.747 INFO  - Loading technical debt model done: 46 ms

18:31:35.747 INFO  - Apply project exclusions

18:31:35.810 WARN  - SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.

18:31:35.810 INFO  - -------------  Scan Trivadis PL/SQL Cop default checks (ex CodeChecker)

18:31:35.810 INFO  - Load module settings

18:31:36.169 INFO  - Loading rules...

18:31:36.560 INFO  - Loading rules done: 391 ms

18:31:36.576 INFO  - Configure Maven plugins

18:31:36.669 INFO  - No quality gate is configured.

18:31:36.794 INFO  - Base dir: C:\workspace\SonarQube\tvdCcResources\.

18:31:36.794 INFO  - Working dir: C:\workspace\SonarQube\tvdCcResources\.\.sonar

18:31:36.794 INFO  - Source paths: src

18:31:36.794 INFO  - Source encoding: UTF-8, default locale: en_US

18:31:36.794 INFO  - Index files

18:31:36.997 INFO  - 80 files indexed

18:31:37.310 INFO  - Quality profile for plsql: Trivadis PL/SQL Cop Quality Profile

INFO: ------------------------------------------------------------------------

INFO: EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

Total time: 5.594s

Final Memory: 52M/736M

INFO: ------------------------------------------------------------------------

ERROR: Error during Sonar runner execution

ERROR: Unable to execute Sonar

ERROR: Caused by: No license for plsql

ERROR:

ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.

ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

 

C:\workspace\SonarQube\tvdCcResources>

 

 

I did install the “SonarQube PL/SQL plugin” to see in the tab “Quality Profiles” the PL/SQL Profiles section, to which I did assign the Quality Profile for my PL/SQL plugin (Trivadis PL/SQL …):

 

 

If I do not install the “SonarQube PL/SQL plugin”, I am not able the define a PL/SQL Profile because the “PL/SQL Profiles” section is not available and I was not able to see any defined rules on the tab “Rules” for my plugin. When the “SonarQube PL/SQL plugin” was installed I was able to define a Quality Profile and I was able to see all rules for my PL/SQL plugin:

 

 

Questions:

1.       How can I make my PL/SQL rules make visible in the SonarQube webapp (tab “Rules”), without having the “SonarQube PL/SQL plugin” installed (languageKey=”plsql”)? No “LANGUAGES = PL/SQL” filter is visible without the “SonarQube PL/SQL plugin” installed.

2.       How can I define a Quality Profile for PL/SQL (tab “Quality Profile”) without the “SonarQube PL/SQL plugin” installed (languageKey=”plsql”)? No “PL/SQL Profiles” section is visible without the “SonarQube PL/SQL plugin” installed.

3.       How can I run a “sonar-runner” task on a PL/SQL project without using the “SonarQube PL/SQL plugin” and not having problem with no licence for it?

 

 

I would greatly appreciate any help on my questions above?

 

Best Regards

Peter

 

 


Reply | Threaded
Open this post in threaded view
|

RE: [sonar-dev] SonarQube Plugins: new custom PL/SQL plugin independent of the SonarQube PL/SQL plugin

Aubacca
This post was updated on .
Yes, that is correct.
Regards
Peter


From: Simon Brandhof [mailto:simon.brandhof@sonarsource.com]
Sent: Donnerstag, 26. März 2015 20:37
To: PUBLIC Codehaus Dev
Subject: Re: [sonar-dev] SonarQube Plugins: new custom PL/SQL plugin independent of the SonarQube PL/SQL plugin

Hi,

I suppose that you installed both your and SonarSource PL/SQL plugins. The latter is close-source and requires a commercial license.
http://www.sonarsource.com/products/plugins/languages/plsql/

Do you confirm that ?
Regards




Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

On 26 March 2015 at 18:44, Peter Rohner <Peter.Rohner@trivadis.com<mailto:Peter.Rohner@trivadis.com>> wrote:
Dear all,
My company has created a analyzer for PL/SQL code written in java (PlSqlCop) to report any found issues of the analyzed PL/SQL code.
At the moment I am implementing a plugin for SonarQube (languageKey=”plsql”, repositoryKey="tvdcc-sql") that will use this PlSqlCop program and import the found issues from PlSqlCop program into the SonarQube environment.

When I run the “sonar-runner” on a project, I got the info “EXECUTION FAILURE” because “ERROR: Caused by: No license for plsql” (see execution log below).

C:\workspace\SonarQube\tvdCcResources>sonar-runner
C:\workspace\SonarQube\sonar-runner-2.4
SonarQube Runner 2.4
Java 1.7.0_76 Oracle Corporation (64-bit)
Windows 8.1 6.3 amd64
INFO: Runner configuration file: C:\workspace\SonarQube\sonar-runner-2.4\conf\sonar-runner.properties
INFO: Project configuration file: C:\workspace\SonarQube\tvdCcResources\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: C:\workspace\SonarQube\tvdCcResources\.\.sonar
INFO: SonarQube Server 5.0.1
18:31:32.388 INFO  - Load global referentials...
18:31:32.544 INFO  - Load global referentials done: 156 ms
18:31:32.544 INFO  - User cache: C:\Users\pro\.sonar\cache
18:31:32.560 INFO  - Install plugins
18:31:32.669 INFO  - Install JDBC driver
18:31:32.669 INFO  - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
18:31:33.591 INFO  - Initializing Hibernate
18:31:34.794 INFO  - Load project referentials...
18:31:35.419 INFO  - Load project referentials done: 625 ms
18:31:35.419 INFO  - Load project settings
18:31:35.701 INFO  - Loading technical debt model...
18:31:35.747 INFO  - Loading technical debt model done: 46 ms
18:31:35.747 INFO  - Apply project exclusions
18:31:35.810 WARN  - SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
18:31:35.810 INFO  - -------------  Scan PL/SQL Cop default checks (ex CodeChecker)
18:31:35.810 INFO  - Load module settings
18:31:36.169 INFO  - Loading rules...
18:31:36.560 INFO  - Loading rules done: 391 ms
18:31:36.576 INFO  - Configure Maven plugins
18:31:36.669 INFO  - No quality gate is configured.
18:31:36.794 INFO  - Base dir: C:\workspace\SonarQube\tvdCcResources\.
18:31:36.794 INFO  - Working dir: C:\workspace\SonarQube\tvdCcResources\.\.sonar
18:31:36.794 INFO  - Source paths: src
18:31:36.794 INFO  - Source encoding: UTF-8, default locale: en_US
18:31:36.794 INFO  - Index files
18:31:36.997 INFO  - 80 files indexed
18:31:37.310 INFO  - Quality profile for plsql: PL/SQL Cop Quality Profile
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 5.594s
Final Memory: 52M/736M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: No license for plsql
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

C:\workspace\SonarQube\tvdCcResources>


I did install the “SonarQube PL/SQL plugin” to see in the tab “Quality Profiles” the PL/SQL Profiles section, to which I did assign the Quality Profile for my PL/SQL plugin (Trivadis PL/SQL …):
[cid:image001.jpg@01D0686B.4E505020]


If I do not install the “SonarQube PL/SQL plugin”, I am not able the define a PL/SQL Profile because the “PL/SQL Profiles” section is not available and I was not able to see any defined rules on the tab “Rules” for my plugin. When the “SonarQube PL/SQL plugin” was installed I was able to define a Quality Profile and I was able to see all rules for my PL/SQL plugin:
[cid:image002.jpg@01D0686B.4E505020]


Questions:

1.       How can I make my PL/SQL rules make visible in the SonarQube webapp (tab “Rules”), without having the “SonarQube PL/SQL plugin” installed (languageKey=”plsql”)? No “LANGUAGES = PL/SQL” filter is visible without the “SonarQube PL/SQL plugin” installed.

2.       How can I define a Quality Profile for PL/SQL (tab “Quality Profile”) without the “SonarQube PL/SQL plugin” installed (languageKey=”plsql”)? No “PL/SQL Profiles” section is visible without the “SonarQube PL/SQL plugin” installed.

3.       How can I run a “sonar-runner” task on a PL/SQL project without using the “SonarQube PL/SQL plugin” and not having problem with no licence for it?


I would greatly appreciate any help on my questions above?

Best Regards
Peter





image001.jpg (180K) <http://sonarqube-archive.15.x6.nabble.com/attachment/5033804/0/image001.jpg>
image002.jpg (242K) <http://sonarqube-archive.15.x6.nabble.com/attachment/5033804/1/image002.jpg>