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

INFO: Saved 'n' coverage measures for file '...' #1626

Merged
merged 2 commits into from
Dec 12, 2018
Merged

INFO: Saved 'n' coverage measures for file '...' #1626

merged 2 commits into from
Dec 12, 2018

Conversation

guwirth
Copy link
Collaborator

@guwirth guwirth commented Dec 12, 2018


This change is Reviewable

- reduce the noise in V1.2.0 LOG file.
- make it DEBUG
- close #1624
@guwirth guwirth added this to the 1.2.1 milestone Dec 12, 2018
@guwirth guwirth requested review from Bertk and ivangalkin December 12, 2018 07:35
Copy link
Contributor

@ivangalkin ivangalkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @guwirth and @Bertk)


cxx-sensors/src/main/java/org/sonar/cxx/sensors/coverage/CxxCoverageSensor.java, line 180 at r1 (raw file):

Quoted 10 lines of code…
          try {
            newCoverage.save();
          } catch (RuntimeException ex) {
            LOG.error("Cannot save measure for file '{}' , ignoring measure. ", filePath, ex);
            CxxUtils.validateRecovery(ex, getLanguage());
          }
          if (LOG.isDebugEnabled()) {
            LOG.debug("Saved '{}' coverage measures for file '{}'", measures.size(), filePath);
          }

...should be...

Quoted 10 lines of code…
          try {
            newCoverage.save();
            if (LOG.isDebugEnabled()) {
              LOG.debug("Saved '{}' coverage measures for file '{}'", measures.size(), filePath);
            }
          } catch (RuntimeException ex) {
            LOG.error("Cannot save measure for file '{}' , ignoring measure. ", filePath, ex);
            CxxUtils.validateRecovery(ex, getLanguage());
          }

...,because in case of a RuntimeException AND IsRecoveryEnabled() == true we will still trace an "saved" message (although nothing was saved actually)

Copy link
Contributor

@ivangalkin ivangalkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

@guwirth guwirth merged commit 8444916 into SonarOpenCommunity:master Dec 12, 2018
@guwirth guwirth mentioned this pull request Dec 21, 2018
@guwirth guwirth deleted the coverage-message-info branch December 27, 2018 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

INFO: Saved 'n' coverage measures for file '...'
2 participants