From ee0358dcf5021752348b7a247370a515f2712612 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Wed, 13 Sep 2023 17:24:52 +0200 Subject: [PATCH] feat: added editorconfig --- .editorconfig | 22 ++++++++++++++++++++++ .pre-commit-config.yaml | 4 ++++ dockerfile | 4 ++++ 3 files changed, 30 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..30671b7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2023 Tobias Schmidl +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{yaml,yml}] +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9145b3..9a58a64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,4 +16,8 @@ repos: rev: v2.1.0 hooks: - id: reuse +- repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: '2.7.2' + hooks: + - id: editorconfig-checker ... diff --git a/dockerfile b/dockerfile index 0f4b951..48ec00a 100644 --- a/dockerfile +++ b/dockerfile @@ -14,6 +14,8 @@ org.opencontainers.image.title=buildimage \ org.opencontainers.image.source="https://git.schmidl.dev/schtobia/buildimage" \ org.opencontainers.image.url="https://git.schmidl.dev/schtobia/buildimage" +# editorconfig-checker-disable + RUN apt update \ && apt install --assume-yes --no-install-recommends \ build-essential \ @@ -21,6 +23,8 @@ RUN apt update \ git \ && find /var/lib/apt -type f -delete +# editorconfig-checker-enable + RUN useradd -rm builder USER builder