[Piglit] [PATCH] editorconfig: Add max_line_length property

Dylan Baker dylan at pnwbakers.com
Tue Feb 26 00:40:11 UTC 2019


Quoting Andres Gomez (2019-02-25 08:45:01)
> On Fri, 2019-02-22 at 18:15 +0000, Eric Engestrom wrote:
> > 
> > On February 22, 2019 2:51:28 PM UTC, Andres Gomez <eric at engestrom.ch> wrote:
> > > The property is supported by most of the editors, but not all:
> > > https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#max_line_length
> > > 
> > > Cc: Eric Engestrom <eric at engestrom.ch>
> > > Cc: Eric Anholt <eric at anholt.net>
> > > Signed-off-by: Andres Gomez <agomez at igalia.com>
> > > ---
> > >  .editorconfig | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/.editorconfig b/.editorconfig
> > > index c614fcca7..e0f13a949 100644
> > > --- a/.editorconfig
> > > +++ b/.editorconfig
> > > @@ -4,15 +4,19 @@ root = true
> > >  indent_style = space
> > >  indent_size = 4
> > >  trim_trailing_whitespace = true
> > > +max_line_length = 79
> > 
> > I'm assuming that's a "78" typo?
> 
> Not really. Python code has its own rules:
> https://gitlab.freedesktop.org/mesa/piglit/blob/master/HACKING#L133
> 
> And, as you can see, it is 79:
> https://www.python.org/dev/peps/pep-0008/#maximum-line-length

PEP0008 suggests between 72 and 99, I think 78 is fine. And since most of the
python is my fault I'm happy to say 78 and be in line with the rest of piglit on
that.

Either way,
Acked-by: Dylan Baker <dylan at pnwbakers.com>

> 
> > Anyway:
> > Acked-by: Eric Engestrom <eric at engestrom.ch>
> 
> Can I still have your Ack-b?
> 
> > If the idea is to have it everywhere though, just put it once in a [*] section.
> 
> Python is special and, in the rest of sections, the other values are
> also individual so I'm being coherent.
> 
> > 
> > >  
> > >  [*.{c,cpp,h,hpp}]
> > >  indent_style = tab
> > >  tab_width = 8
> > > +max_line_length = 78
> > >  
> > >  [*.{cmake,txt}]
> > >  indent_style = tab
> > >  tab_width = 8
> > > +max_line_length = 78
> > >  
> > >  [{README,HACKING}]
> > >  indent_style = tab
> > >  tab_width = 8
> > > +max_line_length = 78
> -- 
> Br,
> 
> Andres
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20190225/69d56812/attachment-0001.sig>


More information about the Piglit mailing list