Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored and mitukou1109 committed Sep 3, 2024
1 parent 4ee52a8 commit 61556ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef AUTOWARE__UNIVERSE_UTILS__GEOMETRY__GEOMETRY_HPP_
#define AUTOWARE__UNIVERSE_UTILS__GEOMETRY__GEOMETRY_HPP_
#ifndef AUTOWARE__UNIVERSE_UTILS__GEOMETRY__ALT_GEOMETRY_HPP_
#define AUTOWARE__UNIVERSE_UTILS__GEOMETRY__ALT_GEOMETRY_HPP_

#include "autoware/universe_utils/geometry/boost_geometry.hpp"

Expand Down Expand Up @@ -159,4 +159,4 @@ bool within(
const alt::ConvexPolygon2d & poly_contained, const alt::ConvexPolygon2d & poly_containing);
} // namespace autoware::universe_utils

#endif // AUTOWARE__UNIVERSE_UTILS__GEOMETRY__GEOMETRY_HPP_
#endif // AUTOWARE__UNIVERSE_UTILS__GEOMETRY__ALT_GEOMETRY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -439,4 +439,4 @@ bool within(

return true;
}
} // namespace autoware::universe_utils
} // namespace autoware::universe_utils
Original file line number Diff line number Diff line change
Expand Up @@ -1081,4 +1081,4 @@ TEST(alt_geometry, withinPolygonRand)
(ground_truth_not_within_ns + ground_truth_within_ns) / 1e6,
(alt_not_within_ns + alt_within_ns) / 1e6);
}
}
}

Check warning on line 1084 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Code Duplication

The module contains 7 functions with similar structure: TEST:alt_geometry:area,TEST:alt_geometry:coveredByRand,TEST:alt_geometry:disjointRand,TEST:alt_geometry:intersectsRand and 3 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 1084 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

TEST:alt_geometry:withinPolygonRand has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 1084 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Deep, Nested Complexity

TEST:alt_geometry:withinPolygonRand has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

0 comments on commit 61556ae

Please sign in to comment.