From f82c6f72b692af29b1f220b2e04061eec9202811 Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Mon, 23 Dec 2019 16:17:39 +0100 Subject: [PATCH] Use EditorConfig instead of vim comments Signed-off-by: Stephan Lachnit --- .circleci/config.yml | 1 - .editorconfig | 20 ++++++++++++++++++++ data/devices/data-parse-test.py | 1 - data/devices/duplicate-check.py | 1 - data/devices/receiver-check.py | 1 - tools/merge_ratbagd.py | 2 -- tools/ratbagc.py.in | 2 -- tools/ratbagctl.devel.in | 2 -- tools/ratbagctl.in.in | 2 -- tools/ratbagctl.test.in | 2 -- tools/toolbox.py | 2 -- 11 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 .editorconfig diff --git a/.circleci/config.yml b/.circleci/config.yml index 8c49a1c9..03efb100 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,3 @@ -# vim: set expandtab shiftwidth=2 tabstop=8: libratbag_references: build_dependencies: &build_dependencies FEDORA_DEP_BUILD: gcc gcc-c++ meson dbus-daemon glib2-devel json-glib-devel libevdev-devel libudev-devel libunistring-devel python3-devel python3-evdev swig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..ea195cd6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{c,h}] +indent_style = tab +tab_width = 8 +trim_trailing_whitespace = true + +[{*.{py,py.in},tools/ratbagctl.*.in}] +indent_style = space +indent_size = 4 + +[*.{yml,xsl}] +indent_style = space +indent_size = 2 diff --git a/data/devices/data-parse-test.py b/data/devices/data-parse-test.py index 1fbe18b2..bdd4fe96 100755 --- a/data/devices/data-parse-test.py +++ b/data/devices/data-parse-test.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# vim: set expandtab shiftwidth=4 tabstop=4: # # Copyright © 2017 Red Hat, Inc. # diff --git a/data/devices/duplicate-check.py b/data/devices/duplicate-check.py index cfcbf517..332f1253 100755 --- a/data/devices/duplicate-check.py +++ b/data/devices/duplicate-check.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# vim: set expandtab shiftwidth=4 tabstop=4: # # Copyright © 2018 Red Hat, Inc. # diff --git a/data/devices/receiver-check.py b/data/devices/receiver-check.py index 60477171..024f3e68 100755 --- a/data/devices/receiver-check.py +++ b/data/devices/receiver-check.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# vim: set expandtab shiftwidth=4 tabstop=4: # # Copyright © 2018 Red Hat, Inc. # diff --git a/tools/merge_ratbagd.py b/tools/merge_ratbagd.py index 69438ba0..77b7e078 100755 --- a/tools/merge_ratbagd.py +++ b/tools/merge_ratbagd.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # -# vim: set expandtab shiftwidth=4 tabstop=4: -# # Copyright 2017 Red Hat, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/tools/ratbagc.py.in b/tools/ratbagc.py.in index 4256fc05..3bcdf544 100644 --- a/tools/ratbagc.py.in +++ b/tools/ratbagc.py.in @@ -1,5 +1,3 @@ -# vim: set expandtab shiftwidth=4 tabstop=4: -# # Copyright 2017-2019 Red Hat, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/tools/ratbagctl.devel.in b/tools/ratbagctl.devel.in index 6589c38e..a3d6c2f6 100755 --- a/tools/ratbagctl.devel.in +++ b/tools/ratbagctl.devel.in @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # -# vim: set expandtab shiftwidth=4 tabstop=4: -# # This file is part of libratbag. # # Copyright 2017 Red Hat, Inc. diff --git a/tools/ratbagctl.in.in b/tools/ratbagctl.in.in index bfea5ab3..ad0baccd 100755 --- a/tools/ratbagctl.in.in +++ b/tools/ratbagctl.in.in @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # -# vim: set expandtab shiftwidth=4 tabstop=4: -# # Copyright 2016 Red Hat, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/tools/ratbagctl.test.in b/tools/ratbagctl.test.in index fce2dc51..c4ad1bf8 100755 --- a/tools/ratbagctl.test.in +++ b/tools/ratbagctl.test.in @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # -# vim: set expandtab shiftwidth=4 tabstop=4: -# # This file is part of libratbag. # # Copyright 2017 Red Hat, Inc. diff --git a/tools/toolbox.py b/tools/toolbox.py index d69bbb0f..6f80c688 100644 --- a/tools/toolbox.py +++ b/tools/toolbox.py @@ -1,5 +1,3 @@ -# vim: set expandtab shiftwidth=4 tabstop=4: -# # This file is part of libratbag. # # Copyright 2017 Red Hat, Inc.