Skip to content

Coding style of avrdude #1572

Answered by dl8dtl
Ho-Ro asked this question in Q&A
Nov 16, 2023 · 3 comments · 7 replies
Discussion options

You must be logged in to vote

Yes, there have been many different contributors, with many different styles in the past.

Well, the first and foremost rule: if you are touching an existing file, try to align with the style you can already find there. This also means: as annoying as trailing white space is (I completely agree), do not be tempted to mangle with it unless you are touching the respective code area anyway.

The reason for that rule is very simple: if you later review a diff across such a change, the white-space only changes could easily obfuscate the actual code changes.

Spaces after opening and before closing parentheses are not commonly used in most coding guidelines, and I think AVRDUDE code has not been u…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@mcuee
Comment options

@Ho-Ro
Comment options

@stefanrueger
Comment options

@MCUdude
Comment options

Answer selected by Ho-Ro
Comment options

You must be logged in to vote
2 replies
@dl8dtl
Comment options

@stefanrueger
Comment options

Comment options

You must be logged in to vote
1 reply
@stefanrueger
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants