From 15b7fe49d1fd9a8a0f45608330bd25ba2663ace5 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Sat, 18 Nov 2023 15:44:38 -0800 Subject: [PATCH 1/3] style(editorconfig): Add rule for Makefile --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index c421ed7..0d5fa09 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,3 +12,6 @@ charset = utf-8 [*.sh] indent_size = 2 + +[Makefile] +indent_style = tab From 8720fcc86d5a353b00cb87ab30c642837cd41541 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Sat, 18 Nov 2023 15:51:18 -0800 Subject: [PATCH 2/3] fix: Reset `LC_ALL` in Makefile --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index d878e17..85d8ca5 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +export LC_ALL=C FILE_NAME=lscolors export XDG_DATA_HOME ?= $${$$HOME/.local/share} From b3b993f2ae11edd38918784f909e89bf72105400 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Mon, 27 Nov 2023 03:07:24 -0800 Subject: [PATCH 3/3] test: Add regression test for non-existent env var --- .editorconfig | 3 +++ .github/workflows/tests.yaml | 17 +++++++++++++++++ .pre-commit-config.yaml | 1 - tests/works_without_env | 5 +++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests.yaml create mode 100755 tests/works_without_env diff --git a/.editorconfig b/.editorconfig index 0d5fa09..a0cada3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,5 +13,8 @@ charset = utf-8 [*.sh] indent_size = 2 +[*.{yaml,yml}] +indent_size = 2 + [Makefile] indent_style = tab diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..0a7f5f4 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,17 @@ +--- +name: 'Run Tests' + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: 'Execute tests' + run: './run_tests' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 32694a7..445d66b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,5 +20,4 @@ repos: additional_dependencies: - mdformat-gfm - mdformat-toc - # EOF diff --git a/tests/works_without_env b/tests/works_without_env new file mode 100755 index 0000000..980d910 --- /dev/null +++ b/tests/works_without_env @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# + +unset -v XDG_DATA_HOME +make install