From 13775b56e5b4c5593d0d01eedf1f01f232545a0e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Feb 2020 09:33:18 +1000 Subject: [PATCH] Use editorconfig instead of a sprinkling of :vim: instructions Signed-off-by: Peter Hutterer --- .editorconfig | 21 +++++++++++++++++++++ .gitlab-ci.yml | 2 -- .gitlab-ci/check-commit.py | 2 -- .gitlab-ci/generate-gitlab-ci.py | 1 - .gitlab-ci/gitlab-ci-config.yaml | 3 --- .gitlab-ci/gitlab-ci.tmpl | 2 -- libevdev/make-event-names.py | 1 - 7 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..81c277e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +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 + +[*.py] +indent_style = space +indent_size = 4 +charset = utf-8 + +[*.{yaml,tmpl}] +indent_style = space +indent_size = 2 +charset = utf-8 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d09e96..2e2167c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,3 @@ -# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml: - ######################################## # # # THIS FILE IS GENERATED, DO NOT EDIT # diff --git a/.gitlab-ci/check-commit.py b/.gitlab-ci/check-commit.py index b533bc4..ed2d897 100755 --- a/.gitlab-ci/check-commit.py +++ b/.gitlab-ci/check-commit.py @@ -1,6 +1,4 @@ #!/usr/bin/env python3 -# vim: set expandtab shiftwidth=4: -# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This script tests a few things against the commit messages, search for # `def test_` to see the actual tests run. diff --git a/.gitlab-ci/generate-gitlab-ci.py b/.gitlab-ci/generate-gitlab-ci.py index f6fe5f1..c159948 100755 --- a/.gitlab-ci/generate-gitlab-ci.py +++ b/.gitlab-ci/generate-gitlab-ci.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# vim: set expandtab shiftwidth=4: # This file generates the .gitlab-ci.yml file that defines the pipeline. diff --git a/.gitlab-ci/gitlab-ci-config.yaml b/.gitlab-ci/gitlab-ci-config.yaml index 98900c7..3f43103 100644 --- a/.gitlab-ci/gitlab-ci-config.yaml +++ b/.gitlab-ci/gitlab-ci-config.yaml @@ -1,9 +1,6 @@ -# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0: -# # This file contains the configuration for the gitlab ci. # See the .gitlab-ci/generate-gitlab-ci.py file for more info - distributions: - name: fedora version: '30' diff --git a/.gitlab-ci/gitlab-ci.tmpl b/.gitlab-ci/gitlab-ci.tmpl index 829193a..bffc7bf 100644 --- a/.gitlab-ci/gitlab-ci.tmpl +++ b/.gitlab-ci/gitlab-ci.tmpl @@ -1,5 +1,3 @@ -# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml: - {# You're looking at the template here, so you can ignore the below warning. This is the right file to edit #} ######################################## diff --git a/libevdev/make-event-names.py b/libevdev/make-event-names.py index 1c94748..88addd7 100755 --- a/libevdev/make-event-names.py +++ b/libevdev/make-event-names.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# vim: set expandtab shiftwidth=4: # # Parses linux/input.h scanning for #define KEY_FOO 134 # Prints C header files or Python files that can be used as -- 2.7.4