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

Remove old comments and printf debug statements. Consistent indenting. #26

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

ohexel
Copy link

@ohexel ohexel commented Dec 4, 2024

Du hast es so gewollt.

* their default values
************************************************************/
/*********************************************************************
* It all starts here .sup file has not been read yet and the sim has
Copy link
Member

Choose a reason for hiding this comment

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

Sind das etwa Tabs?

Copy link
Author

Choose a reason for hiding this comment

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

Das sind hoffentlich 4 Leerzeichen. Ansonsten natürlich Asche auf mein Haupt.

Copy link
Member

Choose a reason for hiding this comment

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

sind tabs... nochmal ändern oder egal?
Gibt eh noch merge conflicts

@tomthe
Copy link
Member

tomthe commented Dec 4, 2024

Habe einmal alles überflogen. Sieht ganz gut aus.
Sowohl die removels von print-statements, als auch die konsistente Formatierung.
Hast du einen automatischen Formatter benutzt? Wenn ja, kannst du bitte hier schreiben ( und am besten auch in https://github.com/MPIDR/rsocsim/blob/main/development.md unter einer neuen Überschrift), welcher Style hier gewünscht ist?

@ohexel
Copy link
Author

ohexel commented Dec 4, 2024

  1. install vim
  2. gg=G

@tomthe
Copy link
Member

tomthe commented Dec 4, 2024

So like this: https://stackoverflow.com/questions/2355834/how-can-i-autoformat-indent-c-code-in-vim

It says this only corrects indentation. Any plans to also change other whitespace stuff?

@ohexel
Copy link
Author

ohexel commented Dec 4, 2024

Correct, I only applied Vim's default indenting which is fairly mild. But if we can agree on something more comprehensive, I'm happy to do it. Right now, it does seem like sometimes the first indentation level is 8 spaces, sometimes 2, sometimes 4.

image

@tomthe
Copy link
Member

tomthe commented Dec 4, 2024

Für mich wären die ersten drei, insbesondere GNU in Ordnung.

@ohexel
Copy link
Author

ohexel commented Dec 4, 2024

OK. I will

  • convert tabs to spaces;
  • make it more GNU-ish;
  • resolve the conflicts.

@ohexel
Copy link
Author

ohexel commented Dec 4, 2024

Das 3. Beispiel scheint nicht wirklich GNU zu sein (https://www.gnu.org/prep/standards/html_node/Writing-C.html). Aber d.h. du magst:

  • einmal einrücken = 2 Leerzeichen;
  • geschwungene Klammern nach Funktionsdefinition auf neuer Zeile;
  • geschwungene Klammern eingerückt

?

@tomthe
Copy link
Member

tomthe commented Dec 4, 2024

Ich bin da nicht dogmatisch. Das wäre ok für mich, aber wenn du etwas anderes für besser hälst, dann ist das auch ok!

@tomthe
Copy link
Member

tomthe commented Dec 4, 2024

Allman scheint verbreiteter zu sein? Enscheide du ruhig.

@ohexel
Copy link
Author

ohexel commented Dec 5, 2024

Should be good now. Consistent indentation for .cpp files. I left the .c files alone. I made formatting suggestions in the README.

@tomthe tomthe merged commit d86ba77 into MPIDR:main Dec 6, 2024
1 check passed
@tomthe
Copy link
Member

tomthe commented Dec 6, 2024

Sieht gut aus

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.

2 participants