Commit Graph

45 Commits

Author SHA1 Message Date
Orhan Ugurlu
2869363c86 Fixed problem that causes exception while highlighting similar strings in a line 2020-07-23 17:36:05 +02:00
Monika Kurovszky
404520b187 T429-008: Update Sonar Ada plugin default profile
Updating rules profile for
       - Codepeer based on 21.0w 20200212
       - GNATcheck based on asistools-21.0w-20200507
  from GNATtracker Continuous Release

Change-Id: I9228e88aac44d2b6dfca8d736ce448c31ebbed30
2020-05-14 17:38:39 +02:00
Monika Kurovszky
84a51245d7 T429-008: Add support of SonarQube 7.9 in Ada plugin
Add dependencies on SonarQube 7.9LTS
  Update depecated import

Change-Id: I9c930388f2078f0b2ee19de8da146c260d22c4ee
2020-05-07 16:57:56 +02:00
Nicolas Setton
cb3b97f6a6 SB30-014 Prepare grounds for using maven in offline mode
Add support for extra environment variables that will be
passed by anod to toggle online/offline mode.

Change-Id: I253ce195e987ab6f4afbd701a1934df96c6e2d9d
2019-12-04 22:07:29 +00:00
Monika Kurovszky
7db29085b9 S211-048: reliable technical debt values for Sonar
Technical debt values are updated for Codepeer and
  GNATcheck rules

Change-Id: Icd1b9ebb581cc3dcd1b7200e9327f5511378e5f1
2019-06-12 10:54:21 +02:00
Monika Kurovszky
7e5d12417c S211-048: Sonar Ada adding technical debt infos
GNATcheck rules generation are based on 
    * "gnatcheck -h" output when are generated
       without specific technical debt infos
    * "gnatcheck -dR -h" output when are generated
       with specific technical debt infos

  CodePeer rules generation are based on
    * "codepeer --list-categories" output when are
      generated without specific technical debt
      infos
    * "codepeer --list-categories-with-debts" output
      when are generated with technical debt infos

    * Update of README file related to different
      .xml files generation used for default Sonar
      Ada profile

Change-Id: Id3f1840317d54b53ecfa87f8b16fbcc26c02e4a3
2019-05-21 17:40:49 +02:00
Monika Kurovszky
2a91e42484 S513-019: adding GNAT checks to GNATcheck rules
Update of GNATcheck rules profile for SonarQube
  Ada plugin with GNAT compilers checks:
    Warnings     - compiler warnings
    Style_Checks - compiler style checks
    Restrictions - checks made by pragma
                   Restriction_Warnings

Change-Id: I5352ffeb498f3efdc5fb7f700526fa090415af72
2019-05-21 16:07:54 +02:00
Monika Kurovszky
47aa011555 S508-011: update Sonar Ada default rules profile
Change-Id: If29c15c51f6348bd3baa50566fae1799baff98f3
2019-05-09 16:27:53 +02:00
Monika Kurovszky
f86c22ca62 P511-010: Add "statements" metric to Sonar Ada plugin
* Save Ada "LSLOC" metric as Sonar "Lines of Code"
    metric
  * Add Ada "all_statements" as Sonar "Statements"
    metric

Change-Id: I9e0e322bcd226e11a61b2191f139b36b0056d117
2019-03-19 14:18:48 +01:00
Monika Kurovszky
1bc0ba9aa1 S214-002: Sonar Ada plug-in test database update
Change-Id: If9ca0af576851e82829bfe66402408d1d46fe750
2019-03-12 11:47:36 +01:00
Monika Kurovszky
5d4c0a1339 S214-002: updating Codepeer rules generation
All rules listed by Codepeer --list-categories
  switch are generated in codepeer.xml in order
  to get all the rule names that can be encountered
  during different level runs

Change-Id: Iac4a24cae476d64b49a3a7096a052db2920544ea
2019-02-20 14:36:14 +01:00
Monika Kurovszky
957550320a RA04-016: Replacing deprecated in Sonar Ada plugin
* Using InputFile.uri().getPath() instead
    InputFile.absolutePath() call

  * Replace deprecated org.sonar.api.config.Settings
    usage by org.sonar.api.config.Configuration

  * GNAThub.java: 
       @BatchSide predicate replaced by @ScannerSide

  * MAinFileSensor.java:
       Replace usage of File with InputFile type for
       ProgressReport

  * AdaProfileDefinition:
       Implement new Quality profile which replace
       old deprecated AdaDefaultProfile

Change-Id: I6cb421cdec1887575085ad1a3c3583bcbb870a8e
2019-01-17 18:11:13 +01:00
Monika Kurovszky
3e0aa6efc1 RA04-016: Sonar Ada plugin snapshot version update
Update of Sonar Ada plugin to the master branch
  20.0w version in pom.xml files

Change-Id: I5c10965b2b64cc80cbc5918d3e3b79a6127499dd
2019-01-14 09:59:49 +02:00
Monika Kurovszky
4dfad37eea RA04-016: Sonar Ada plugin update
* Adding script to regenerate default profile .xml
    
    For that go to GIT repo of GNATdashboard
       /sonar-ada/sonar-ada-plugin/src/ruledef/
    and do
       make ada_rules_profile_definition

Change-Id: Icf90768191d44aab6fefe5f1b04cdf71577f4aa7
2018-12-19 15:48:56 +01:00
Monika Kurovszky
78e1649675 P511-010: Replace by "all_stmts" "code lines" in SQ
Package level "all_stmts" metric is the appropriate
  GNATmetric measure to be reported in SonarQube as
  LSLOC (i.e. Logical SLOC attempts to measure the
  number of executable "statements")

Change-Id: I3306f49592df36361850f1228c566054b6c97632
2018-12-06 13:41:58 +01:00
Monika Kurovszky
c60cc7a4c1 R702-017: Display Cyclomatic Complexity in SonarQube
This change is about fixing missing Cyclomatic
  Complexity value for Ada project in SonarQube.
  This is a SonarQube metric which values are of
  integer type and it is used for example as
  parameter by the overview of coverage complexity
  graph.
  
  The sum of cyclomatic complexities for all
  methods of the file is computed by using an SQL
  query and storing the result on a new attribute
  of FileMeasures class.

Change-Id: Ia8e050c254c05deda9936732e71674a68762dbb0
2018-11-30 17:55:14 +01:00
Monika Kurovszky
869090e332 R912-015 : Sonar Ada Plugin test DB update
New database is added containing GCOV informations
  for unit tests

Change-Id: I578bf234c9a61ec917b2f5feaf82aa30c6a464f9
2018-09-13 15:30:04 +02:00
Monika Kurovszky
5ab24de5be Use of codepeer --list-categories to generate .xml
Codepeer --list-categories switch is used to
  generate codepeer.xml instead of generation based
  on codepeer documentation parsing
  
  generate-codepeer-rules-definition:
    removed since no longer used

Part of R509-024

Change-Id: I1e107624559ea93702f8bc12384756a3212223ff
2018-07-27 10:33:31 +02:00
Monika Kurovszky
a86eee5a74 Revert "Use of codepeer --list-categories to generate .xml"
This reverts commit 369418ac46.

Change-Id: Ief782ebbf00c0c8c93423d2ea918bad644acda7c
2018-07-26 18:01:47 +02:00
Monika Kurovszky
369418ac46 Use of codepeer --list-categories to generate .xml
Codepeer --list-categories switch is used to
  generate codepeer.xml instead of generation based
  on codepeer documentation parsing
  
  generate-codepeer-rules-definition:
    removed since no longer used

Part of R509-024

Change-Id: If6eea73dbd4c7cd0745612a0c24f5d3281407cac
2018-07-26 17:18:34 +02:00
Monika Kurovszky
716cc945fe Sonar Ada Plugin: Remove references to categories
Replacing all references to categories table of
  DB by messages table ranking field since DB model
  changed and Categories table was removed.
  Update unit tests by adding a new DB for sdc.gpr

Part of R709-047

Change-Id: If4ba0e635e03e94dc949b8e5913a10d63ab06b01
2018-07-25 17:42:47 +02:00
Monika Kurovszky
1c13812880 Fixing gnatcheck rules file regression
* gnatcheck.xml was regenerated after update of
     gnatcheck -h output which makes visible from
     now recursive_subprograms rule

Part of R223-001

Change-Id: I8069f6290789b65011969e3ded2d69bf6cb222a1
2018-02-27 15:52:54 +01:00
Nicolas Setton
f057055f1d Generate gnatcheck.xml rules from the output of gnatcheck -h
Add a cheapo script to do that and a Makefile entry.

For R109-055.

Change-Id: I37b801253bccfda2131ed2b57f580b07ef20c644
2018-01-10 20:47:02 -05:00
Monika Kurovszky
05ed360320 Fix crash when highlighting empty strings
AdaHighlightingSensor.java:
      stringsHighlighting crash fix to handle empty
      strings

Part of QC06-030

Change-Id: I6d3bcd48936bfac719920c1baa54da830bcfede8
2017-12-06 18:23:29 +01:00
Monika Kurovszky
93d0bc6521 Sonar-Ada:
Upgrade version to 6.7 LTS in pom.xml(s) for
        Sonar plugin

* Ada.java: dependencies on
       org.sonar.api.config.Settings (i.e. which is
       an abstract class in the 6.7 LTS) replaced by
       org.sonar.api.config.Configuration
* pom.xml: 
       upgrade of snapshot version to 19.0 and
       SonarQube version to 6.7 LTS

Part of QB13-048

Change-Id: Icfc18217e59837f3c8eee89d14e8d067ca74dda1
2017-11-30 14:33:24 +01:00