Showing 159 of 159 total issues
Function listReportEvaluations
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public listReportEvaluations(
params: SecurityAndComplianceCenterApiV3.ListReportEvaluationsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.EvaluationPage>> {
const _params = { ...params };
const _requiredParams = ['reportId'];
Similar blocks of code found in 4 locations. Consider refactoring. Open
const body = {
'description': _params.description,
'target': _params.target,
'required_config': _params.requiredConfig,
'type': _params.type,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 71.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
const query = {
'attachment_id': _params.attachmentId,
'group_id': _params.groupId,
'profile_id': _params.profileId,
'type': _params.type,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 71.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
const query = {
'assessment_id': _params.assessmentId,
'component_id': _params.componentId,
'target_id': _params.targetId,
'target_name': _params.targetName,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 71.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function replaceProfile
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public replaceProfile(
params: SecurityAndComplianceCenterApiV3.ReplaceProfileParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
const _params = { ...params };
const _requiredParams = ['profilesId', 'profileName', 'profileDescription', 'profileType', 'controls', 'defaultParameters'];
Function getReportControls
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getReportControls(
params: SecurityAndComplianceCenterApiV3.GetReportControlsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportControls>> {
const _params = { ...params };
const _requiredParams = ['reportId'];
Similar blocks of code found in 2 locations. Consider refactoring. Open
try {
res = await securityAndComplianceCenterApiService.getProviderTypesInstances({});
console.log(JSON.stringify(res.result, null, 2));
} catch (err) {
console.warn(err);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 70.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
try {
res = await securityAndComplianceCenterApiService.listProviderTypes({});
console.log(JSON.stringify(res.result, null, 2));
} catch (err) {
console.warn(err);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 70.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function createCustomControlLibrary
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public createCustomControlLibrary(
params: SecurityAndComplianceCenterApiV3.CreateCustomControlLibraryParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibrary>> {
const _params = { ...params };
const _requiredParams = ['controlLibraryName', 'controlLibraryDescription', 'controlLibraryType', 'controls'];
Function updateProviderTypeInstance
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public updateProviderTypeInstance(
params: SecurityAndComplianceCenterApiV3.UpdateProviderTypeInstanceParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeInstanceItem>> {
const _params = { ...params };
const _requiredParams = ['providerTypeId', 'providerTypeInstanceId'];
Function createRule
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public createRule(
params: SecurityAndComplianceCenterApiV3.CreateRuleParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Rule>> {
const _params = { ...params };
const _requiredParams = ['description', 'target', 'requiredConfig'];
Function createProviderTypeInstance
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public createProviderTypeInstance(
params: SecurityAndComplianceCenterApiV3.CreateProviderTypeInstanceParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeInstanceItem>> {
const _params = { ...params };
const _requiredParams = ['providerTypeId'];
Function listReports
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public listReports(
params?: SecurityAndComplianceCenterApiV3.ListReportsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportPage>> {
const _params = { ...params };
const _requiredParams = [];
Function createAttachment
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public createAttachment(
params: SecurityAndComplianceCenterApiV3.CreateAttachmentParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentPrototype>> {
const _params = { ...params };
const _requiredParams = ['profilesId', 'attachments'];
Function listAttachments
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public listAttachments(
params: SecurityAndComplianceCenterApiV3.ListAttachmentsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentCollection>> {
const _params = { ...params };
const _requiredParams = ['profilesId'];
Function getReportEvaluation
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getReportEvaluation(
params: SecurityAndComplianceCenterApiV3.GetReportEvaluationParams
): Promise<SecurityAndComplianceCenterApiV3.Response<NodeJS.ReadableStream>> {
const _params = { ...params };
const _requiredParams = ['reportId'];
Function createProfile
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public createProfile(
params: SecurityAndComplianceCenterApiV3.CreateProfileParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
const _params = { ...params };
const _requiredParams = ['profileName', 'profileDescription', 'profileType', 'controls', 'defaultParameters'];
Function getReportViolationsDrift
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getReportViolationsDrift(
params: SecurityAndComplianceCenterApiV3.GetReportViolationsDriftParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportViolationsDrift>> {
const _params = { ...params };
const _requiredParams = ['reportId'];
Similar blocks of code found in 3 locations. Consider refactoring. Open
export interface EventNotifications {
/** The Event Notifications instance CRN. */
instance_crn?: string;
/** The date when the Event Notifications connection was updated. */
updated_on?: string;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 66.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
export interface TargetInfo {
/** The target ID. */
id?: string;
/** The target account ID. */
account_id?: string;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 66.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76