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

test with SQ 7.6 #1674

Merged
merged 1 commit into from
Feb 5, 2019
Merged

test with SQ 7.6 #1674

merged 1 commit into from
Feb 5, 2019

Conversation

guwirth
Copy link
Collaborator

@guwirth guwirth commented Jan 25, 2019

fix directories metric

  • https://community.sonarsource.com/t/pre-sq7-6-different-directories-metric-value/6190
  • In SQ 7.6 the old “Maven/Java like” filesystem layout has been replaced by a more modern hierarchy, without modules, but with a hierarchy of folders (instead of having flat package-like folders).
  • This new approach will change the value of the metric “directories” because this metric count the number of directory “nodes” in the SonarQube component tree. This is misleading since I guess most people expect the value to be the number of physical sub-directories. In my example above, pre-7.6 value would be 3, and post 7.6 value will be 5 (another pitfall of this metric is that folders containing test files are not counted).

This change is Reviewable

@guwirth guwirth added this to the 1.2.2 milestone Jan 25, 2019
@guwirth guwirth self-assigned this Jan 25, 2019
@guwirth
Copy link
Collaborator Author

guwirth commented Jan 25, 2019

Assertion Failed: directories is actually 5 [expected: 4.0]

@SqApi75
  Scenario: Smoketest 
    Given the project "smoketest_project"
    And the following metrics have following values
      | directories              | 4     |
      Assertion Failed: 
      	directories is actually 5 [expected: 4.0]

@guwirth
Copy link
Collaborator Author

guwirth commented Jan 27, 2019

- https://community.sonarsource.com/t/pre-sq7-6-different-directories-metric-value/6190
- In SQ 7.6 the old “Maven/Java like” filesystem layout has been replaced by a more modern hierarchy, without modules, but with a hierarchy of folders (instead of having flat package-like folders).
- This new approach will change the value of the metric “directories” because this metric count the number of directory “nodes” in the SonarQube component tree. This is misleading since I guess most people expect the value to be the number of physical sub-directories. In my example above, pre-7.6 value would be 3, and post 7.6 value will be 5 (another pitfall of this metric is that folders containing test files are not counted).
@guwirth guwirth merged commit ae0beaf into SonarOpenCommunity:master Feb 5, 2019
@guwirth guwirth mentioned this pull request Feb 8, 2019
@guwirth guwirth deleted the test-sq7.6 branch July 29, 2019 11: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.

1 participant