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

RULEAPI-826 Compute rule / product mapping #4575

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions rspec-tools/rspec_tools/coverage.py
marco-antognini-sonarsource marked this conversation as resolved.
Show resolved Hide resolved

Choose a reason for hiding this comment

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

I had a look at the data we produce and there is something fishy. I'll hold off merging this because I don't want the script to cause trouble during the holidays when we are not there -- it would not be a nice Xmas gift.

Looking at S100 (very old rule), we say:

  • for C/C++/ObjC: introduced in 9.0 Dev edition ✅
  • for Apex: enterprise edition (probably correct), introduced in 10.7: does not match reality SQS report it being there since Nov 02, 2018.
  • for C#: Dev edition (sounds correct) but introduced in SQS 10.8 / sqcb-24.12 but SQ reports the rule being introduced in 2015...

I don't know where we do things incorrectly...

Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def comparable_version(key):
if is_version_tag(v):
return list(map(int, v.split('.')))
if v == 'master':
return [0]
return [sys.maxsize]
sys.exit(f'Unexpected version {key}')


Expand Down Expand Up @@ -300,7 +300,7 @@ def lowest_version(plugin_versions, plugin, version, skip_suffix):
pvv = plugin_versions[t][plugin]
if comparable_version(pvv) >= comparable_version(version):
return t
sys.exit(f'failed finding the oldest version of {plugin} containing {version} from {plugin_versions}')
return "Coming soon"

Choose a reason for hiding this comment

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

I'm not sure we want a "coming soon" fake version. It would be better to not give such version (i.e., make both SonarQube Community Build and SonarQube Server optional).

See also my comment here: https://sonarsource.atlassian.net/browse/SONARSITE-2248?focusedCommentId=709499



def lowest_community_build_version(plugin_versions, plugin, version):
Expand Down
Loading