Skip to content
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

run clang-format in CI #1692

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

run clang-format in CI #1692

wants to merge 6 commits into from

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Dec 30, 2024

Briefly, what does this PR introduce?

This is like eic/epic#705

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

Yes, current PR's will have to be rebased, however there is a procedure to do edits fully automated.

Does this PR change default behavior?

No

@github-actions github-actions bot added topic: infrastructure topic: documentation Improvements or additions to documentation topic: calorimetry relates to calorimetry topic: tracking Relates to tracking reconstruction topic: PID Relates to PID reconstruction topic: far-forward Far forward reconstruction topic: far-backward Reconstruction related to far backward detectors topic: barrel topic: forward topic: backward topic: jets topic: digitization labels Dec 30, 2024
@veprbl veprbl force-pushed the pr/clang-format-ci branch from ff278ba to a84a2c9 Compare December 30, 2024 03:24
@veprbl veprbl force-pushed the pr/clang-format-ci branch from 2d55bbd to bc11374 Compare December 30, 2024 03:39
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

}

//-------------------------------------------
// FinishWithGlobalRootLock
//-------------------------------------------
void TofEfficiency_processor::FinishWithGlobalRootLock() {

// Do any final calculations here.

// Do any final calculations here.
}

int TofEfficiency_processor::IsTOFHit(float x, float y, float z) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-easily-swappable-parameters ⚠️
2 adjacent parameters of IsTOFHit of similar type (float) are easily swapped by mistake

// warning("{} eV is out of QE data range, assuming 0\% efficiency",ev);
return false;
}
bool PhotoMultiplierHitDigi::qe_pass(double ev, double rand) const {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-easily-swappable-parameters ⚠️
2 adjacent parameters of qe_pass of similar type (double) are easily swapped by mistake

part.addToClusters(*cluster);
return part;
edm4eic::MutableReconstructedParticle
MatchClusters::reconstruct_neutral(const edm4eic::Cluster* cluster, const double mass,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-easily-swappable-parameters ⚠️
2 adjacent parameters of reconstruct_neutral of convertible types are easily swapped by mistake

(float)vtx.position().z(),
(float)vtx.time(),
}); // vtxposition
eicvertex.setPositionError(cov); // covariance

for (const auto& t : vtx.tracks()) {
#if Acts_VERSION_MAJOR >= 33
const auto& par = finderCfg.extractParameters(t.originalParams);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-use-after-move ⚠️
finderCfg used after it was moved

if (traj->hasTrackParameters(trackTip)) {
const auto& boundParam = traj->trackParameters(trackTip);
const auto& parameter = boundParam.parameters();
const auto& covariance = *boundParam.covariance();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-unchecked-optional-access ⚠️
unchecked access to optional value

m_log->trace(" propagation result is OK");

// Pulling results to convenient variables
auto trackStateParams = *((*result).endParameters);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-unchecked-optional-access ⚠️
unchecked access to optional value

// Pulling results to convenient variables
auto trackStateParams = *((*result).endParameters);
const auto& parameter = trackStateParams.parameters();
const auto& covariance = *trackStateParams.covariance();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-unchecked-optional-access ⚠️
unchecked access to optional value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: backward topic: barrel topic: calorimetry relates to calorimetry topic: digitization topic: documentation Improvements or additions to documentation topic: far-backward Reconstruction related to far backward detectors topic: far-forward Far forward reconstruction topic: forward topic: infrastructure topic: jets topic: PID Relates to PID reconstruction topic: tracking Relates to tracking reconstruction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant