Skip to content

checksrc: warn for "onelinecondition"#5164

Closed
bagder wants to merge 2 commits intomasterfrom
bagder/checksrc-onelinecondition
Closed

checksrc: warn for "onelinecondition"#5164
bagder wants to merge 2 commits intomasterfrom
bagder/checksrc-onelinecondition

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 30, 2020

Make checksrc verify that we insert newline after if() conditions and fix a few places where this updated checksrc pointed out this mistake to exist in.

The check is a little naive and will only work for single-line conditions but I think they are the most common for this code style anyway.

@bagder bagder added the tidy-up label Mar 30, 2020
bagder added 2 commits March 30, 2020 11:21
Our code style mandates we put the conditional block on a separate
line. These mistakes were detected by the updated checksrc.
@bagder bagder force-pushed the bagder/checksrc-onelinecondition branch from 4277a29 to e7f0c31 Compare March 30, 2020 09:21
@bagder bagder closed this in 529add4 Mar 30, 2020
@bagder bagder deleted the bagder/checksrc-onelinecondition branch March 30, 2020 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant