Skip to content

Conversation

@alexander-novo
Copy link
Collaborator

@alexander-novo alexander-novo commented Dec 2, 2024

I only minimally edited some files manually, such as PowerSystemData.hpp

Comment on lines 21 to 23
InductionMotor<ScalarT, IdxT>::InductionMotor(
IdxT id, ScalarT Lls, ScalarT Rs, ScalarT Llr, ScalarT Rr, ScalarT Lms, ScalarT RJ, ScalarT P)
: Lls_(Lls), Rs_(Rs), Llr_(Llr), Rr_(Rr), Lms_(Lms), RJ_(RJ), P_(P)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we configure formatting of functions with many arguments and initialization in constructor like below? It spans more lines of code but it is clearer and let you add comments for each variable, if necessary.

Suggested change
InductionMotor<ScalarT, IdxT>::InductionMotor(
IdxT id, ScalarT Lls, ScalarT Rs, ScalarT Llr, ScalarT Rr, ScalarT Lms, ScalarT RJ, ScalarT P)
: Lls_(Lls), Rs_(Rs), Llr_(Llr), Rr_(Rr), Lms_(Lms), RJ_(RJ), P_(P)
InductionMotor<ScalarT, IdxT>::InductionMotor(IdxT id, // explanation what this variable is
ScalarT Lls,
ScalarT Rs,
ScalarT Llr,
ScalarT Rr,
ScalarT Lms,
ScalarT RJ,
ScalarT P)
: Lls_(Lls),
Rs_(Rs),
Llr_(Llr),
Rr_(Rr),
Lms_(Lms),
RJ_(RJ),
P_(P)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is already set such that If you were to add a comment to one of the lines as shown, then the formatter will format as shown.

@alexander-novo
Copy link
Collaborator Author

alexander-novo commented Feb 9, 2025

Files which require some manual overriding of autoformatting:

  • src/PowerSystemData.hpp
  • src/Model/PowerElectronics/DistributedGenerator/DistributedGenerator.cpp

@pelesh
Copy link
Collaborator

pelesh commented Mar 4, 2025

Closing in favor of #68.

@pelesh pelesh closed this Mar 4, 2025
@pelesh pelesh deleted the format-all branch June 10, 2025 18:00
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.

3 participants