-
Notifications
You must be signed in to change notification settings - Fork 21
Add synthetics stepDetail.allowFailure and stepDetail.failure #2064
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
Add synthetics stepDetail.allowFailure and stepDetail.failure #2064
Conversation
| # @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, fields, opts = {}) | ||
| def get_monthly_cost_attribution_with_http_info(start_month, end_month, fields, opts = {}) |
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.
⚪ 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.
| # @see #get_monthly_cost_attribution_with_http_info | ||
| def get_monthly_cost_attribution(start_month, fields, opts = {}) | ||
| data, _status_code, _headers = get_monthly_cost_attribution_with_http_info(start_month, fields, opts) | ||
| def get_monthly_cost_attribution(start_month, end_month, fields, opts = {}) |
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.
⚪ 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.
51a12f2 to
ad3efa3
Compare
ad3efa3 to
a7d6f27
Compare
Co-authored-by: ci.datadog-api-spec <[email protected]> 66ba7df
See DataDog/datadog-api-spec#3194
Test branch datadog-api-spec/test/damien.bernard/SYNTH-14462/add-allowfailure-and-failure-stepdetail