Skip to content

Conversation

@api-clients-generation-pipeline
Copy link
Contributor

# @option opts [Boolean] :include_descendants Include child org cost in the response. Defaults to `true`.
# @return [Array<(MonthlyCostAttributionResponse, Integer, Hash)>] MonthlyCostAttributionResponse data, response status code and response headers
def get_monthly_cost_attribution_with_http_info(start_month, end_month, fields, opts = {})
def get_monthly_cost_attribution_with_http_info(start_month, fields, opts = {})

Choose a reason for hiding this comment

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

Code Quality Violation

Avoid using a hash as an optional parameter (...read more)

The rule "Avoid hash optional parameters" is a guideline that encourages developers to explicitly declare parameters instead of using a hash for optional parameters. This is because using a hash for optional parameters can make the code harder to understand and maintain. It can also lead to unexpected behavior if a developer accidentally includes a key in the hash that the method does not expect.

This rule is important because it promotes code readability and maintainability. It also helps prevent potential bugs that may occur due to unexpected keys in the optional hash. By explicitly declaring each parameter, developers can easily see what parameters a method expects, making the code easier to read and understand.

To adhere to this rule, instead of using a hash for optional parameters, explicitly declare each parameter in the method definition. For example, instead of using options = {} in the method definition, declare each parameter like name, email, age. This way, anyone reading the code can easily understand what parameters the method expects and in what order.

View in Datadog  Leave us feedback  Documentation

# @see #get_monthly_cost_attribution_with_http_info
def get_monthly_cost_attribution(start_month, end_month, fields, opts = {})
data, _status_code, _headers = get_monthly_cost_attribution_with_http_info(start_month, end_month, fields, opts)
def get_monthly_cost_attribution(start_month, fields, opts = {})

Choose a reason for hiding this comment

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

Code Quality Violation

Avoid using a hash as an optional parameter (...read more)

The rule "Avoid hash optional parameters" is a guideline that encourages developers to explicitly declare parameters instead of using a hash for optional parameters. This is because using a hash for optional parameters can make the code harder to understand and maintain. It can also lead to unexpected behavior if a developer accidentally includes a key in the hash that the method does not expect.

This rule is important because it promotes code readability and maintainability. It also helps prevent potential bugs that may occur due to unexpected keys in the optional hash. By explicitly declaring each parameter, developers can easily see what parameters a method expects, making the code easier to read and understand.

To adhere to this rule, instead of using a hash for optional parameters, explicitly declare each parameter in the method definition. For example, instead of using options = {} in the method definition, declare each parameter like name, email, age. This way, anyone reading the code can easily understand what parameters the method expects and in what order.

View in Datadog  Leave us feedback  Documentation

@api-clients-generation-pipeline api-clients-generation-pipeline bot force-pushed the datadog-api-spec/generated/3154 branch 2 times, most recently from 263bfd7 to 20b9f8c Compare October 1, 2024 11:30
@api-clients-generation-pipeline api-clients-generation-pipeline bot force-pushed the datadog-api-spec/generated/3154 branch 2 times, most recently from 39dc169 to 5ef6880 Compare October 15, 2024 10:13
@api-clients-generation-pipeline api-clients-generation-pipeline bot changed the title Mark Cost-Attribution end_month parameter as not required RQ-3183: Mark Cost-Attribution end_month parameter as not required Oct 16, 2024
@api-clients-generation-pipeline api-clients-generation-pipeline bot force-pushed the datadog-api-spec/generated/3154 branch from 5ef6880 to 279c6d4 Compare October 16, 2024 19:05
@api-clients-generation-pipeline api-clients-generation-pipeline bot changed the title RQ-3183: Mark Cost-Attribution end_month parameter as not required Mark Cost Attribution end_month parameter as not required Oct 16, 2024
@api-clients-generation-pipeline api-clients-generation-pipeline bot force-pushed the datadog-api-spec/generated/3154 branch from 279c6d4 to 6aee14b Compare October 16, 2024 20:07
@api-clients-generation-pipeline api-clients-generation-pipeline bot merged commit d5e3ae3 into master Oct 17, 2024
15 checks passed
@api-clients-generation-pipeline api-clients-generation-pipeline bot deleted the datadog-api-spec/generated/3154 branch October 17, 2024 13:56
github-actions bot pushed a commit that referenced this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants