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

SonarImporter docs examples are invalid #3297

Closed
moritz-suckow opened this issue May 15, 2023 · 2 comments · Fixed by #3301
Closed

SonarImporter docs examples are invalid #3297

moritz-suckow opened this issue May 15, 2023 · 2 comments · Fixed by #3301
Assignees
Labels
bug Only issues that describe bugs. documentation priority:high Set by PO

Comments

@moritz-suckow
Copy link
Collaborator

moritz-suckow commented May 15, 2023

Bug

Expected Behavior

WHEN

I visit the SonarImporter documentation and look for examples on how to use the SonarImporter

THEN

I want the given examples to work.

Actual Behavior

The given examples must be modified in order to work.

Notes

If you use the commands, as described in the examples in the docs, the user will receive a strange error message:
Get values for metrics [erge-modules=false]

@moritz-suckow moritz-suckow added bug Only issues that describe bugs. documentation labels May 15, 2023
@moritz-suckow
Copy link
Collaborator Author

I looked at the documentation for the SonarImporter and I found the issue.

All parameters should be passed with -- infront of them, but in the documentation that is not the case, there we are using instead.
After taking a look at the documentation in the code all commands are correctly specified in the documentation, but are somehow automatically converted from -- into (which is not a singular - but rather some kind of bigger connected -).

@moritz-suckow
Copy link
Collaborator Author

Looking at the note my guess what happened:
Since copy pasting from the documentation right now results in every double dash being a single dash the command probably looked something like this:

ccsh sonarimport www.someprojecturl.de someprojectkey –user=someUserToken –output-file=someFileName –merge-modules=false

Now instead of --merge-modules we have -merge-modules which starts with -m which is the option specifiying the metrics.

The weird message normally outputs all metrics which will be imported. In this case the -merge-modules=false option was interpreted as -m erge-modules=false, so the "metrics" ccsh tried to import where erge-modules=false which is exactly the output.

moritz-suckow added a commit that referenced this issue May 15, 2023
@ce-bo ce-bo added the priority:high Set by PO label May 15, 2023
@ce-bo ce-bo removed their assignment May 15, 2023
@moritz-suckow moritz-suckow linked a pull request May 15, 2023 that will close this issue
moritz-suckow added a commit that referenced this issue May 16, 2023
* Fix formatting issues in command examples in docs #3297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Only issues that describe bugs. documentation priority:high Set by PO
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants