Skip to content

Conversation

@Grufoony
Copy link
Collaborator

@Grufoony Grufoony commented Apr 1, 2025

No description provided.

@codecov
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

Attention: Patch coverage is 28.57143% with 60 lines in your changes missing coverage. Please review.

Project coverage is 88.66%. Comparing base (e986a43) to head (ec24a72).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dsm/sources/RoadNetwork.cpp 26.47% 50 Missing ⚠️
src/dsm/headers/RoadDynamics.hpp 45.45% 6 Missing ⚠️
src/dsm/sources/Road.cpp 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #291      +/-   ##
==========================================
- Coverage   89.50%   88.66%   -0.84%     
==========================================
  Files          38       38              
  Lines        5146     5206      +60     
  Branches      461      477      +16     
==========================================
+ Hits         4606     4616      +10     
- Misses        540      590      +50     
Flag Coverage Δ
unittests 88.66% <28.57%> (-0.84%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

allowedTurns.erase(Direction::LEFT);
allowedTurns.erase(Direction::STRAIGHT);
allowedTurns.emplace(Direction::LEFTANDSTRAIGHT);
break;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
allowedTurns.emplace(Direction::LEFTANDSTRAIGHT);
break;
}
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
break;
}
}
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
allowedTurns.emplace(Direction::LEFT);
}
if (allowedTurns.size() > 2) {
// Remove duplicates

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
if (std::abs(deltaAngle) < std::numbers::pi) {
// Lanes are counted as 0 is the far right lane
if (std::abs(deltaAngle) < std::numbers::pi / 4) {
if (std::abs(deltaAngle) < std::numbers::pi / 8) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
std::format("Street {} can turn RIGHT", pInStreet->id()));
if (std::abs(deltaAngle) < std::numbers::pi / 8) {
Logger::debug(std::format("Street {} -> {} can turn STRAIGHT",
pInStreet->source(),

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
} else if (deltaAngle > 0.) {
Logger::debug(std::format("Street {} -> {} can turn LEFT",
pInStreet->source(),
pInStreet->target()));

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
if (allowedTurns.size() > static_cast<size_t>(nLanes)) {
if (pair.second->isTrafficLight()) {
auto& tl = dynamic_cast<TrafficLight&>(*pair.second);
auto const& cycles{tl.cycles()};

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
Logger::debug(
std::format("Using traffic light {} cycles for street {} -> {}",
tl.id(),
pInStreet->source(),

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
allowedTurns.clear();
for (auto const& [direction, cycle] : cycle) {
allowedTurns.emplace(direction);
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
for (auto const& [direction, cycle] : cycle) {
allowedTurns.emplace(direction);
}
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
allowedTurns.clear();
allowedTurns.emplace(Direction::RIGHTANDSTRAIGHT);
allowedTurns.emplace(Direction::LEFT);
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
} else if (deltaAngle < 0.) {
Logger::debug(std::format("Street {} -> {} can turn RIGHT",
pInStreet->source(),
pInStreet->target()));

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
if (cycles.contains(pInStreet->id())) {
if (cycles.size() == static_cast<size_t>(nLanes)) {
// Replace with the traffic light cycles
Logger::debug(

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
} else if (cycles.at(pInStreet->id())
.contains(Direction::LEFTANDSTRAIGHT)) {
allowedTurns.erase(Direction::LEFT);
allowedTurns.erase(Direction::STRAIGHT);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
allowedTurns.emplace(Direction::LEFTANDSTRAIGHT);
} else if (cycles.at(pInStreet->id())
.contains(Direction::RIGHTANDSTRAIGHT)) {
allowedTurns.erase(Direction::RIGHT);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
} else if (cycles.at(pInStreet->id())
.contains(Direction::RIGHTANDSTRAIGHT)) {
allowedTurns.erase(Direction::RIGHT);
allowedTurns.erase(Direction::STRAIGHT);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
}
}
assert(!possibleMoves.empty());
if (streetId.has_value()) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
newStreetIds.emplace(streetId, newStreetId);
}
std::for_each(
m_edges.cbegin(), m_edges.cend(), [this, &newStreetIds](auto const& pair) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
m_edges.cbegin(), m_edges.cend(), [this, &newStreetIds](auto const& pair) {
auto const& pStreet{pair.second};
auto const& forbiddenTurns{pStreet->forbiddenTurns()};
if (forbiddenTurns.empty()) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
}
}
}
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 15.7 rule Note

MISRA 15.7 rule
// std::format("Street {}->{} with {} lanes and {} allowed turns",
// pInStreet->source(),
// pInStreet->target(),
// nLanes,

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 15.5 rule Note

MISRA 15.5 rule
@Grufoony Grufoony merged commit 1d3c95a into main Apr 1, 2025
29 of 31 checks passed
@Grufoony Grufoony deleted the fixautomapping branch April 1, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant