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 reproducer for #1706 #1752

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

martin-strecker-sonarsource
Copy link
Contributor

Reproducer for #1706

@"--debug"
};
var args = new ProcessRunnerArguments(batchName, true) { CmdLineArgs = expected, WorkingDirectory = testDir };
var success = runner.Execute(args);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is passed to the Test.bat looks like this:

^^^"^^^-^^^D^^^s^^^o^^^n^^^a^^^r^^^.^^^s^^^c^^^a^^^n^^^A^^^l^^^l^^^F^^^i^^^l^^^e^^^s^^^=^^^t^^^r^^^u^^^e^^^"^^^ ^^^"^^^-^^^D^^^p^^^r^^^o^^^j^^^e^^^c^^^t^^^.^^^s^^^e^^^t^^^t^^^i^^^n^^^g^^^s^^^=^^^D^^^:^^^\^^^D^^^e^^^v^^^L^^^i^^^b^^^T^^^e^^^s^^^t^^^\^^^C^^^l^^^a^^^s^^^s^^^L^^^i^^^b^^^r^^^a^^^r^^^y^^^T^^^e^^^s^^^t^^^.^^^s^^^o^^^n^^^a^^^r^^^q^^^u^^^b^^^e^^^\^^^o^^^u^^^t^^^\^^^s^^^o^^^n^^^a^^^r^^^-^^^p^^^r^^^o^^^j^^^e^^^c^^^t^^^.^^^p^^^r^^^o^^^p^^^e^^^r^^^t^^^i^^^e^^^s^^^"^^^ ^^^"^^^-^^^-^^^f^^^r^^^o^^^m^^^=^^^S^^^c^^^a^^^n^^^n^^^e^^^r^^^M^^^S^^^B^^^u^^^i^^^l^^^d^^^/^^^5^^^.^^^1^^^3^^^.^^^1^^^"^^^ ^^^"^^^-^^^-^^^d^^^e^^^b^^^u^^^g^^^"

Double quotes surround every argument, and every character is then escaped by prepending ^^^. This works somewhat but breaks under certain conditions. What precisely the conditions are is not clear to me. The log from the issue indicates a Portuguese local (CP860), which may have an impact too.

@"@echo off
REM The sonar-scanner.bat uses %* to pass the argument to javac.exe
echo %*
REM Because of the escaping, the single arguments are somewhat broken on echo. A workaround is to add some new lines for some reason.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be fixed by #1751

Copy link

sonarcloud bot commented Nov 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@"-Dsonar.scanAllFiles=true",
@"-Dproject.settings=D:\DevLibTest\ClassLibraryTest.sonarqube\out\sonar-project.properties",
@"--from=ScannerMSBuild/5.13.1",
@"--debug"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Taken from the community ticket logs:
-Dsonar.scanAllFiles=true -Dproject.settings=D:\DevLibTest\ClassLibraryTest\.sonarqube\out\sonar-project.properties --from=ScannerMSBuild/5.13 --debug <sensitive data removed>

<sensitive data removed> indicates that there might be something passed that caused the failure but isn't in the logs.

Copy link
Member

Choose a reason for hiding this comment

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

LGTM!

@costin-zaharia-sonarsource costin-zaharia-sonarsource merged commit 9bd2dd4 into master Nov 10, 2023
28 checks passed
@costin-zaharia-sonarsource costin-zaharia-sonarsource deleted the Martin/Repro_1706 branch November 10, 2023 15:37
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.

2 participants