-
Notifications
You must be signed in to change notification settings - Fork 32
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
EPMRPP-89264 code style reformat #300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
reviewdog
src/main/java/com/epam/reportportal/auth/TokenServicesFacade.java|48 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/TokenServicesFacade.java|62 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/TokenServicesFacade.java|70 col 25| Abbreviation in name 'createOAuth2Request' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/integration/saml/ReportPortalSamlAuthentication.java|51 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/saml/ReportPortalSamlAuthentication.java|64 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/AbstractUserReplicator.java|52 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/github/ExternalOauth2TokenConverter.java|47 col 26| Local variable name 'oAuth2Authentication' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/integration/github/GitHubTokenServices.java|47 col 53| Member name 'oAuthRegistrationSupplier' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]$'.
src/main/java/com/epam/reportportal/auth/integration/github/GitHubTokenServices.java|50 col 43| Parameter name 'oAuthRegistrationSupplier' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/integration/github/GitHubTokenServices.java|61 col 31| Local variable name 'oAuthRegistrationResource' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/integration/github/GitHubTokenServices.java|101 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/github/GithubOauthProvider.java|36| Line is longer than 100 characters (found 589).
src/main/java/com/epam/reportportal/auth/integration/github/GithubOauthProvider.java|44 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/github/GithubEndpoint.java|50 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/github/GitHubClient.java|83 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/github/GitHubUserReplicator.java|69 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/converter/SamlConverter.java|85| Line is longer than 100 characters (found 142).
src/main/java/com/epam/reportportal/auth/integration/converter/OAuthRegistrationConverters.java|53 col 28| Local variable name 'oAuthRegistrationScope' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/integration/converter/OAuthRegistrationConverters.java|101| Line is longer than 100 characters (found 162).
src/main/java/com/epam/reportportal/auth/integration/converter/OAuthRestrictionConverter.java|40| Line is longer than 100 characters (found 137).
src/main/java/com/epam/reportportal/auth/integration/converter/OAuthRestrictionConverter.java|41| Line is longer than 100 characters (found 135).
src/main/java/com/epam/reportportal/auth/integration/converter/OAuthRestrictionConverter.java|46| Line is longer than 100 characters (found 163).
src/main/java/com/epam/reportportal/auth/integration/parameter/SamlParameter.java|79 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/parameter/SamlParameter.java|98 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/parameter/SamlParameter.java|113 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/parameter/ParameterUtils.java|48 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/parameter/ParameterUtils.java|67 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/parameter/LdapParameter.java|84 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/parameter/LdapParameter.java|108 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/parameter/LdapParameter.java|128 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/AuthIntegrationStrategy.java|40 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/AuthIntegrationStrategy.java|50 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/AuthIntegrationStrategy.java|63 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/SamlIntegrationStrategy.java|61 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/DeleteAuthIntegrationHandlerImpl.java|50 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/DeleteAuthIntegrationHandlerImpl.java|84 col 23| Local variable name 'oAuthRegistration' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/CreateAuthIntegrationHandlerImpl.java|49 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/CreateAuthIntegrationHandlerImpl.java|96 col 23| Local variable name 'oAuthRegistration' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProviderFactory.java|30 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProviderFactory.java|30 col 35| Abbreviation in name 'fillOAuthRegistration' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProvider.java|31 col 23| Abbreviation in name 'OAuthProvider' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProvider.java|48 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProvider.java|58 col 40| Abbreviation in name 'getOAuthRestOperations' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/AuthSuccessHandler.java|45 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|58 col 45| Member name 'oAuthRegistrationRepository' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]$'.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|63 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|64 col 67| Parameter name 'oAuthRegistrationRepository' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|116 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|133 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|151 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|151 col 23| Abbreviation in name 'OAuthProviderInfo' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|61 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|81 col 36| Abbreviation in name 'updateOAuthSettings' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|98 col 32| Abbreviation in name 'deleteOAuthSetting' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|111 col 49| Abbreviation in name 'getOAuthSettings' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|125 col 36| Abbreviation in name 'getOAuthSettings' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/AuthConfigurationEndpoint.java|60 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthConfigurationEndpoint.java|130 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/SsoEndpoint.java|44 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/util/CertificationUtil.java|43 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/util/CertificationUtil.java|60 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/util/RequestUtil.java|34 col 3| Missing a Javadoc comment.
@Component("mutableClientRegistrationRepository") | ||
public class MutableClientRegistrationRepository implements ClientRegistrationRepository { | ||
|
||
private final OAuthRegistrationRepository oAuthRegistrationRepository; | ||
private final OAuthRegistrationRepository oAuthRegistrationRepository; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Member name 'oAuthRegistrationRepository' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
} | ||
@Autowired | ||
public MutableClientRegistrationRepository( | ||
OAuthRegistrationRepository oAuthRegistrationRepository) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public Optional<OAuthRegistration> findOAuthRegistrationById(String registrationId) { | ||
return this.oAuthRegistrationRepository.findById(registrationId); | ||
} | ||
public Optional<OAuthRegistration> findOAuthRegistrationById(String registrationId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Abbreviation in name 'findOAuthRegistrationById' must contain no more than '1' consecutive capital letters.
return new SimpleKey(); | ||
} | ||
|
||
public class LocalServiceProviderConfigurationDelegate extends LocalServiceProviderConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
private SamlUserReplicator samlUserReplicator; | ||
private SamlServerConfiguration serviceProviderConfiguration; | ||
|
||
public SamlServiceProviderBeanConfiguration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
} | ||
return xfHeader.split(",")[0]; | ||
} | ||
private String getClientIP(HttpServletRequest request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Abbreviation in name 'getClientIP' must contain no more than '1' consecutive capital letters.
public void onApplicationEvent(UiUserSignedInEvent event) { | ||
String username = event.getAuthentication().getName(); | ||
userRepository.updateLastLoginDate(LocalDateTime.ofInstant(Instant.ofEpochMilli(event.getTimestamp()), ZoneOffset.UTC), username); | ||
@EventListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
* @param id {@link OAuthRegistration#id} | ||
* @return Built {@link OAuthRegistrationResource} | ||
*/ | ||
public Optional<OAuthRegistrationResource> loadOAuthRegistration(String id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Abbreviation in name 'loadOAuthRegistration' must contain no more than '1' consecutive capital letters.
} | ||
}).orElseGet(BaseOAuth2ProtectedResourceDetails::new); | ||
private static BaseOAuth2ProtectedResourceDetails getOauth2ProtectedResourceDetails( | ||
OAuthRegistrationResource oAuthRegistrationResource) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.oAuth2RequestFactory = new DefaultOAuth2RequestFactory(clientDetailsService); | ||
} | ||
private final DefaultTokenServices jwtTokenServices; | ||
private final OAuth2RequestFactory oAuth2RequestFactory; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Member name 'oAuth2RequestFactory' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
reviewdog
src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/AuthIntegrationStrategy.java|40 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/AuthIntegrationStrategy.java|50 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/AuthIntegrationStrategy.java|63 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/SamlIntegrationStrategy.java|61 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/DeleteAuthIntegrationHandlerImpl.java|50 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/DeleteAuthIntegrationHandlerImpl.java|84 col 23| Local variable name 'oAuthRegistration' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/CreateAuthIntegrationHandlerImpl.java|49 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/integration/handler/impl/CreateAuthIntegrationHandlerImpl.java|96 col 23| Local variable name 'oAuthRegistration' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProviderFactory.java|30 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProviderFactory.java|30 col 35| Abbreviation in name 'fillOAuthRegistration' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProvider.java|31 col 23| Abbreviation in name 'OAuthProvider' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProvider.java|48 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/oauth/OAuthProvider.java|58 col 40| Abbreviation in name 'getOAuthRestOperations' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/AuthSuccessHandler.java|45 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|58 col 45| Member name 'oAuthRegistrationRepository' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|63 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|64 col 67| Parameter name 'oAuthRegistrationRepository' must match pattern '^a-z?$'.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|116 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|133 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|151 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthProvidersInfoContributor.java|151 col 23| Abbreviation in name 'OAuthProviderInfo' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|61 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|81 col 36| Abbreviation in name 'updateOAuthSettings' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|98 col 32| Abbreviation in name 'deleteOAuthSetting' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|111 col 49| Abbreviation in name 'getOAuthSettings' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/OAuthConfigurationEndpoint.java|125 col 36| Abbreviation in name 'getOAuthSettings' must contain no more than '1' consecutive capital letters.
src/main/java/com/epam/reportportal/auth/endpoint/AuthConfigurationEndpoint.java|60 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/AuthConfigurationEndpoint.java|130 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/endpoint/SsoEndpoint.java|44 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/util/CertificationUtil.java|43 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/util/CertificationUtil.java|60 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/util/RequestUtil.java|34 col 3| Missing a Javadoc comment.
private final OAuth2RequestFactory oAuth2RequestFactory; | ||
private final ClientDetailsService clientDetailsService; | ||
|
||
@Autowired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
return createNonApiToken(client, username, userAuthentication, extensionParams); | ||
} | ||
|
||
public OAuth2AccessToken createNonApiToken(ReportPortalClient client, String username, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
Map<String, Serializable> extensionParams) { | ||
return createNonApiToken(client, username, userAuthentication, extensionParams); | ||
} | ||
private OAuth2Request createOAuth2Request(ReportPortalClient client, String username, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Abbreviation in name 'createOAuth2Request' must contain no more than '1' consecutive capital letters.
private String responseXml; | ||
private String issuer; | ||
|
||
public ReportPortalSamlAuthentication(boolean authenticated, Assertion assertion, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
issuer = assertion.getIssuer().getValue(); | ||
} | ||
|
||
public ReportPortalSamlAuthentication(DefaultSamlAuthentication defaultSamlAuthentication) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
IDP_NAME_ID.setParameter(request, integration); | ||
IDP_ALIAS.setParameter(request, integration); | ||
IDP_URL.setParameter(request, integration); | ||
public static void setSamlParameters(UpdateAuthRQ request, Integration integration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
.filter(it -> it.getParameter(integration).isPresent()) | ||
.collect(Collectors.toMap(LdapParameter::getParameterName, it -> it.getParameter(integration).get())); | ||
} | ||
public static Map<String, String> getLdapSyncAttributes(Integration integration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
return syncAttribute; | ||
} | ||
|
||
public void setParameter(Integration integration, String value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
return getParameter(integration).isPresent(); | ||
} | ||
|
||
public String getRequiredParameter(Integration integration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
.map(String::valueOf); | ||
} | ||
|
||
public Optional<String> getParameter(Map<String, Object> parametersMap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
Quality Gate failedFailed conditions C Reliability Rating on New Code (required ≥ A) See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
...