[Rpm-maint] [rpm-software-management/rpm] Warn if %else is after %else (#649)

Panu Matilainen notifications at github.com
Fri May 17 10:38:54 UTC 2019


pmatilai commented on this pull request.



> @@ -462,6 +430,22 @@ int readLine(rpmSpec spec, int strip)
     lineType = parseLineType(s);
     if (!lineType)
 	goto after_classification;
+
+    /* check ordering of the conditional */
+    if (lineType->isConditional &&
+	(spec->readStack->lastConditional->id & lineType->wrongPrecursors)) {

The condition continuation is on the same indentation level as the if-block it surrounds, which makes it easy to misread. Please fix the indentation, using well named helper variables to shorten the condition is usually the best way to do that.

This was probably there in previous rounds too, sorry for not noticing.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/649#pullrequestreview-238855362
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190517/5905d4df/attachment.html>


More information about the Rpm-maint mailing list