Skip to content

Conversation

@wmathurin
Copy link
Contributor

  • Not sending scope parameter in authorization url if no scopes defined
  • Added test for scope parameter building method in SalesforceOAuthUnitTests.m
  • Removed check for scopes in SFSDKAppConfig (class responsible for parsing bootconfig)
  • Added new test suite BootconfigTests.swift
  • Added check for id scope in SFIdentityCoordinator.m
  • Added new helper class ScopeParser.swift
  • Added new test suite ScopeParserTests.swift
  • Moved some tests files that were in SalesforceSDKCore instead of SalesforceSDKCoreTests

- Not sending scope parameter in authorization url if no scopes defined
- Added test for scope parameter building method in SalesforceOAuthUnitTests.m
- Removed check for scopes in SFSDKAppConfig (class responsible for parsing bootconfig)
- Added new test suite BootconfigTests.swift
- Added check for id scope in SFIdentityCoordinator.m
- Added new helper class ScopeParser.swift
- Added new test suite ScopeParserTests.swift
- Moved some tests files that were in SalesforceSDKCore instead of SalesforceSDKCoreTests
@github-actions
Copy link

1 Warning
⚠️ Static Analysis found an issue with one or more files you modified. Please fix the issue(s).

Clang Static Analysis Issues

File Type Category Description Line Col
SFOAuthCoordinator Nullability Memory error nil assigned to a pointer which is expected to have non-null value 119 19
SFOAuthCoordinator Nullability Memory error nil assigned to a pointer which is expected to have non-null value 370 15
SFOAuthCoordinator Nullability Memory error nil assigned to a pointer which is expected to have non-null value 380 15
SFSDKAppConfig Bad return type when passing NSError** Coding conventions (Apple) Method accepting NSError** should have a non-void return value to indicate whether or not an error occurred 165 1

Generated by 🚫 Danger

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 63.63636% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.01%. Comparing base (c16a7f6) to head (92164b4).
⚠️ Report is 5 commits behind head on dev.

Files with missing lines Patch % Lines
.../SalesforceSDKCore/Classes/OAuth/ScopeParser.swift 60.37% 21 Missing ⚠️
...lesforceSDKCore/Classes/OAuth/SFOAuthCoordinator.m 66.66% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (63.63%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3943      +/-   ##
==========================================
- Coverage   63.48%   63.01%   -0.48%     
==========================================
  Files         250      249       -1     
  Lines       22506    22455      -51     
==========================================
- Hits        14288    14150     -138     
- Misses       8218     8305      +87     
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 70.58% <ø> (ø)
Core 53.16% <63.63%> (-0.79%) ⬇️
SmartStore 73.66% <ø> (ø)
MobileSync 87.66% <ø> (ø)
Files with missing lines Coverage Δ
.../SalesforceSDKCore/Classes/Common/SFSDKAppConfig.m 90.62% <ø> (+26.44%) ⬆️
...ceSDKCore/Classes/Identity/SFIdentityCoordinator.m 43.33% <100.00%> (-5.30%) ⬇️
...lesforceSDKCore/Classes/OAuth/SFOAuthCoordinator.m 42.24% <66.66%> (-0.27%) ⬇️
.../SalesforceSDKCore/Classes/OAuth/ScopeParser.swift 60.37% <60.37%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return NO;
}
if (self.oauthScopes.count == 0) {
[[self class] createError:error withCode:SFSDKAppConfigErrorCodeNoOAuthScopes message:[SFSDKResourceUtils localizedString:@"appConfigValidationErrorNoOAuthScopes"]];
Copy link
Member

@bbirman bbirman Oct 13, 2025

Choose a reason for hiding this comment

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

Could appConfigValidationErrorNoOAuthScopes be removed from the strings file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

- Removed oauthScopes (it's now optional) from sample apps bootconfig
@wmathurin
Copy link
Contributor Author

Failing test does not fail locally.

@wmathurin wmathurin merged commit f71eda5 into forcedotcom:dev Oct 14, 2025
25 of 32 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.

2 participants