Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scoverage metrics and reports #3

Merged
merged 115 commits into from
May 1, 2016
Merged

Add scoverage metrics and reports #3

merged 115 commits into from
May 1, 2016

Conversation

aborsu
Copy link
Contributor

@aborsu aborsu commented May 1, 2016

No description provided.

RadoBuransky and others added 28 commits May 8, 2015 13:29
added maven samples with README
Fixed coverage reporting in sonar - instrumentation should now also w…
The stub parser is not used anymore, removed it
Justification: relying on getParentFile gets the path splitting working  under windows and unix

- adapted the tests to the new behavior
- added a windows / unix switch in the tests to get them working on both systems

PathUtils now converts:
- the empty path to an empty List
- an absolute path to a list folders (not including the drive name under windows)
- a relative path to a list of folders
Justification:

- sanitizing the reported file pathes to a common format makes the sensor simpler
- it is a precondition for implementing proper directory coverage
- tests run now under unix and windows, easier to develop

The sonar.sources property can be read from the settings. By mapping all
reported pathes (absolute / base dir relative / source dir relative) against
the actual file tree it is possible to converte all of them to the same
source dir relative format.

For instance

    /home/src/main/scala/folder/test0.scala  => folder/test0.scala
                         folder/test1.scala  => folder/test1.scala
         /src/main/scala/test2.scala         =>        test2.scala
   ...
- testing absolute report file paths
- testing base dir relative report file paths
- testing source dir relative report file paths
If the core metric STATEMENTS value is already set scoverage will not
overwrite the value but the existing value will also not align with the
covered statement values.

Using a separated value solves this problem

- Added totalStatements to the plugin metrics
The SonarQube treemap widgets work better if metrics exist for the
project, the directory and the file level.

Project coverage is defined as sum of ALL children
Directory coverage is defined as sum of the DIRECT children

The directories have to be treated special because the SonarQube treemap
displays all directories on the same level (not as a tree). Using full
sums would hide bad coverage results in some cases.
- measures should be saved for all levels (directory, project, module, file)
- the sum should not be necessary any more
- makes the two metrics more similar, a correct "sum" for the coverage value
cannot be defined as easily.
fix link syntax, link to releases
Improved path handling, reported filenames are converted to src dir relative paths
Adding directory coverage thus supporting the Treemap widget
…overage

Added total statements metric to avoid overlaps with coremetrics
@ghost
Copy link

ghost commented May 1, 2016

5a49787

Initial commit

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

4006bfa

Copy sonar-scala

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

00f1eba

parseFakeReport

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

fa99ed5

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

f2e9305

Min

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

339e4a7

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

fa853f9

Pure Java

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

158bf60

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

58d0d1f

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

3f92496

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

a85e82b

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

957d5f9

XML parser

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

c48f687

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

95c7fb0

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

140d3ba

Fix

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

5ac543d

Testing

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

754df7d

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

831bbdb

Parent POM, license

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

32abf66

Scala 2.10.0, licenses

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

3559692

Sonar API v4.0

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

4804dc9

Javadoc

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

943f66f

Doc

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

97a40b8

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

549beff

Doc update

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

21be1a5

Fix files located in the root directory.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

8087190

Overall coverage for multimodule projects

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

5e926ae

Restructure

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

eafe059

.

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

9e49a28

Travis CI

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

dab15ac

Travis CI

Status must start with one of the followings:
doc, feat, fix, perf, refactor, revert, style, test
Conform status to <type>(<scope>): <subject> pattern

@aborsu aborsu merged commit 5ece71d into master May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants