[Piglit] [PATCH] editorconfig: Add max_line_length property

Eric Engestrom eric.engestrom at intel.com
Mon Feb 25 19:11:07 UTC 2019


On Monday, 2019-02-25 18:45:01 +0200, Andres Gomez wrote:
> 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

Wasn't aware, thanks!

> 
> > Anyway:
> > Acked-by: Eric Engestrom <eric at engestrom.ch>
> 
> Can I still have your Ack-b?

Of course :)

> 
> > 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
> 


More information about the Piglit mailing list