-
Notifications
You must be signed in to change notification settings - Fork 21
Reorder incident search parameters #2267
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
base: master
Are you sure you want to change the base?
Reorder incident search parameters #2267
Conversation
# verify the required parameter 'query' is set | ||
if @api_client.config.client_side_validation && query.nil? | ||
fail ArgumentError, "Missing the required parameter 'query' when calling IncidentsAPI.search_incidents" | ||
end | ||
allowable_values = ['users', 'attachments'] |
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
allowable_values = ['users', 'attachments'] | |
allowable_values = %w[users attachments] |
Consider using the %w syntax instead (...read more)
The rule "Prefer %w
to the literal array syntax" is a Ruby style guideline that encourages the use of %w
notation instead of the traditional array syntax when defining arrays of strings. This rule is part of the Ruby community's efforts to promote readability and simplicity in Ruby code.
This rule is important because it helps to keep the code concise and easy to read. The %w
notation allows you to define an array of strings without having to use quotes and commas. This can make the code cleaner and easier to understand, especially when dealing with large arrays.
To follow this rule, replace the traditional array syntax with the %w
notation. For example, instead of writing ['foo', 'bar', 'baz']
, you should write %w[foo bar baz]
. This will create the same array, but in a more readable and concise way. By following this rule, you can help to make your Ruby code cleaner and easier to understand.
Datadog ReportBranch report: ✅ 0 Failed, 2994 Passed, 153 Skipped, 3m 10.47s Total Time |
This PR has been automatically marked as stale because it has not had activity in the last 30 days. |
5d05aba
to
eec9121
Compare
See DataDog/datadog-api-spec#3564
Test branch datadog-api-spec/test/jordan.thomas/reorder-incident-search-parameters