Showing 50 of 159 total issues
Function getProviderTypeById
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getProviderTypeById(
params: SecurityAndComplianceCenterApiV3.GetProviderTypeByIdParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeItem>> {
const _params = { ...params };
const _requiredParams = ['providerTypeId'];
Function deleteCustomProfile
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public deleteCustomProfile(
params: SecurityAndComplianceCenterApiV3.DeleteCustomProfileParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
const _params = { ...params };
const _requiredParams = ['profilesId'];
Function deleteRule
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public deleteRule(
params: SecurityAndComplianceCenterApiV3.DeleteRuleParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.EmptyObject>> {
const _params = { ...params };
const _requiredParams = ['ruleId'];
Function postTestEvent
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public postTestEvent(
params?: SecurityAndComplianceCenterApiV3.PostTestEventParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.TestEvent>> {
const _params = { ...params };
const _requiredParams = [];
Function listProviderTypes
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public listProviderTypes(
params?: SecurityAndComplianceCenterApiV3.ListProviderTypesParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypesCollection>> {
const _params = { ...params };
const _requiredParams = [];
Function getSettings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getSettings(
params?: SecurityAndComplianceCenterApiV3.GetSettingsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Settings>> {
const _params = { ...params };
const _requiredParams = [];
Function getProviderTypesInstances
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getProviderTypesInstances(
params?: SecurityAndComplianceCenterApiV3.GetProviderTypesInstancesParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypesInstancesResponse>> {
const _params = { ...params };
const _requiredParams = [];
Function getNext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public async getNext(): Promise<SecurityAndComplianceCenterApiV3.Report[]> {
if (!this.hasNext()) {
throw new Error('No more results available');
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getNext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public async getNext(): Promise<SecurityAndComplianceCenterApiV3.Evaluation[]> {
if (!this.hasNext()) {
throw new Error('No more results available');
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getNext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public async getNext(): Promise<SecurityAndComplianceCenterApiV3.Resource[]> {
if (!this.hasNext()) {
throw new Error('No more results available');
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"