Thread (15 messages) 15 messages, 3 authors, 2023-06-04

Re: [PATCH v2 2/2] ref-filter: add new "signature" atom

From: Oswald Buddenhagen <hidden>
Date: 2023-06-02 08:23:56

just some nitpicks from me:

On Fri, Jun 02, 2023 at 07:41:55AM +0530, Kousik Sanagavarapu wrote:
Duplicate the code for outputting the signature and it's other
"its", not "it's". this repeats all over the place, so please look up 
the rules.
+static void grab_signature(struct atom_value *val, int deref, struct 
object *obj)
+{
+		if (!skip_prefix(name, "signature", &name) || (*name &&
+			*name != ':'))
+			continue;
this looks confusing.

but there appears to be no exception to the "no excess braces" rule for 
multi-line conditions, unlike for bodies - maybe there should be?

also, i would wrap logically, not right at the margin, so

	if (!skip_prefix(name, "signature", &name) ||
	    (*name && *name != ':'))
+		else if (atom->u.signature.option == S_GRADE) {
brace symmetry rule violated.
+			case 'R':
+				v->s = xstrfmt("%c", (char)sigc.result);
+			}
omitting the final 'break' looks like bad style to me.

regards,
ossi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help