> -----Original Message-----
> From: William Allen Simpson [mailto:william.allen.simp...@gmail.com]
> Sent: Monday, November 28, 2016 8:46 AM
> To: NFS Ganesha Developers <nfs-ganesha-devel@lists.sourceforge.net>
> Subject: [Nfs-ganesha-devel] pre-commit refusals for ANSI formatted
strings
> 
> If the printf string is on one line, I get dozens of
> 
> WARNING: line over 80 characters
> #206: FILE: src/MainNFSD/nfs_worker_thread.c:1332:
> +                              "NFS DISPATCHER: FAILURE: Error while
> calling svc_sendreply on a new request. rpcxid=%" PRIu32 " socket=%d
> function:%s client:%s program:%" PRIu32 " nfs version:%" PRIu32 " proc:%"
> PRIu32 " errno: %d",
> 
> 
> If I split the lines, I get dozens of
> 
> WARNING: quoted string split across lines
> #245: FILE: src/MainNFSD/nfs_worker_thread.c:1393:
> +                     "%s Request from host %s V3 not allowed on this
> export"
> +                     ", proc=%" PRIu32
> 
> I refuse to make commits that look like:

We had a discussion about SPLIT_STRING on the call and I will be disabling
that check. I will leave in the option that allows strings to exceed 80
columns, so people as they are coding may choose whether to split or not
(I've seen some splits that leave things less readable). Unfortunately, the
PRI bits do break the quoted string up, so you can't exceed 80 columns on a
line with both a PRI macro and a quoted string fragment, but you will be
able to break up your string in a way that makes it more readable to you
(like breaking
"foo: %" PRIx32"seconds, dog: %" PRIu32
into:
"foo:%" PRIx32 "seconds,"
"dog:%" PRIu32,

If that makes your code more readable.

On the other hand, we don't have to break up a string that due to indents is
starting on column 70 into tiny unreadable chunks out of some need to keep
to 80 columns, or find a good place to split the string that goes a few
characters beyond column 80.

> "NFS DISPATCHER: FAILURE: Error while calling svc_sendreply on a new
> request. rpcxid=%"
> PRIu32
> " socket=%d function:%s client:%s program:%"
> PRIu32
> " nfs version:%"
> PRIu32
> " proc:%"
> PRIu32
> " errno: %d",
> 
> I refuse to review code that looks like that, either!

Yea, that's not the way to go...

I know checkpatch is sometimes frustrating, but please folks let's keep our
language respectful. We don't have to be "PC" here, just try and be
respectful.

Thanks

Frank


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to