On Tue, May 30, 2023 at 10:23 AM Robin Jarry <[email protected]> wrote: > > EditorConfig is a file format and collection of text editor plugins for > maintaining consistent coding styles between different editors and IDEs. > > Initialize the file following the coding rules in > Documentation/internals/contributing/coding-style.rst > > In order for this file to be taken into account (unless they use an > editor with built-in EditorConfig support), developers will have to > install a plugin. > > Note: The max_line_length property is only supported by a limited number > of EditorConfig plugins. It will be ignored if unsupported. > > Link: https://editorconfig.org/ > Link: https://github.com/editorconfig/editorconfig-emacs > Link: https://github.com/editorconfig/editorconfig-vim > Link: > https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#max_line_length > Signed-off-by: Robin Jarry <[email protected]> > ---
Great idea, editorconfig is super convenient to have. Acked-by: Mike Pattrick <[email protected]> > > Notes: > v2: add .editorconfig to EXTRA_DIST > > .editorconfig | 14 ++++++++++++++ > Makefile.am | 1 + > 2 files changed, 15 insertions(+) > create mode 100644 .editorconfig > > diff --git a/.editorconfig b/.editorconfig > new file mode 100644 > index 000000000000..f7f43ecfeea3 > --- /dev/null > +++ b/.editorconfig > @@ -0,0 +1,14 @@ > +# See https://editorconfig.org/ for syntax reference. > + > +root = true > + > +[*] > +end_of_line = lf > +insert_final_newline = true > +trim_trailing_whitespace = true > +charset = utf-8 > +max_line_length = 79 > + > +[*.{c,h}] > +indent_style = space > +indent_size = 4 > diff --git a/Makefile.am b/Makefile.am > index df9c33dfe631..db341504d37f 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -82,6 +82,7 @@ EXTRA_DIST = \ > .ci/osx-build.sh \ > .ci/osx-prepare.sh \ > .cirrus.yml \ > + .editorconfig \ > .github/workflows/build-and-test.yml \ > appveyor.yml \ > boot.sh \ > -- > 2.40.1 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
