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

PYSCAN-43 Ensure CLI arguments to the sonar-scanner-cli are provided intentionally #37

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

guillaume-dequenne-sonarsource
Copy link
Contributor

No description provided.

@guillaume-dequenne-sonarsource guillaume-dequenne-sonarsource changed the title Pyscan 43 PYSCAN-43 Ensure CLI arguments to the sonar-scanner-cli are provided intentionally Jan 19, 2024
@guillaume-dequenne-sonarsource guillaume-dequenne-sonarsource marked this pull request as ready for review January 19, 2024 14:05
Copy link

sonarcloud bot commented Jan 19, 2024

Copy link
Contributor

@joke1196 joke1196 left a comment

Choose a reason for hiding this comment

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

Looks good to me. I have added a small question/comment for the next iteration, no actions required.

def test_minimal_project_unexpected_arg(sonarqube_client: SonarQubeClient):
process = CliClient().run_analysis(sonarqube_client, params=["-unexpected"], sources_dir="minimal")
assert process.returncode == 0
assert "ERROR: Unrecognized option: -unexpected" in process.stdout
Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering if the sonar cli was writing to the STDERR stream when an error is encountered. If this is the case we could check that STDERR is empty or assert on errors. But I think for now this is totally fine like this! It is just an idea for the next iteration linked to this ticket

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

@guillaume-dequenne-sonarsource guillaume-dequenne-sonarsource merged commit 9345789 into master Jan 22, 2024
9 checks passed
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.

3 participants