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

chore: check supported keys only for test-coverage #225

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

srijan-deepsource
Copy link
Contributor

key is an optional flag, and is only used by the test coverage analyzer to identify the language for the report.

Previously, the check would always fail since it was matching against a whitelist of supported keys. This PR changes the behavior to check it only for test-coverage artifact reporting.

@@ -127,7 +127,7 @@ func (opts *ReportOptions) Run() int {
return keys
}

if !supportedKeys[reportCommandKey] {
if reportCommandAnalyzerShortcode == "test-coverage" && !supportedKeys[reportCommandKey] {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the logic following this if block make sense if the analyzer is not test-coverage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The logic in the if block makes sense only for test-coverage analyzer. key was designed to be an optional field, and only test coverage analyzer accepts artifacts with multiple keys.

Everything else after this if block makes sense for all analyzers.

@srijan-deepsource srijan-deepsource merged commit 47330bf into master Oct 3, 2023
4 of 5 checks passed
@srijan-deepsource srijan-deepsource deleted the eng-37 branch October 3, 2023 14:16
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