DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
129 stars 55 forks source link

Refactor step function code by flipping if-condition #1455

Closed lym953 closed 2 months ago

lym953 commented 2 months ago

What

Refactors some code by changing:

if (<condition>) {
  // do a lot of things
}
return false;

to

if (!<condition>) {
  return false;
}
// do a lot of things

Why

Make code more readable in that:

Testing

This is a simple change, so just npm test

Review checklist

datadog-datadog-prod-us1[bot] commented 2 months ago

Datadog Report

Branch report: yiming.luo/fix-step-func-5 Commit report: 1306a7c Test service: datadog-ci-tests

:white_check_mark: 0 Failed, 376 Passed, 0 Skipped, 1m 26.67s Total duration (2m 1.01s time saved)