From c93eb80bbe44f290d2506d14cc7d47b5f15fa82c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 7 Sep 2020 13:49:10 +0200 Subject: [PATCH 1/5] actions: add editorconfig checker Adds `lint-editorconfig` make target. Co-authored-by: Jan-Niklas Burfeind version bump to 2.6.0 --- .github/workflows/lint.yml | 22 ++++++++++++++++++++++ Makefile | 5 ++++- scripts/lint-editorconfig.sh | 5 +++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 scripts/lint-editorconfig.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ce830eff..a5ed4f0d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,3 +30,25 @@ jobs: run: ln -s ./docs/site-example ./site - name: Lint shell code run: make lint-sh + + editorconfig: + name: Editorconfig + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install Dependencies + run: sudo apt install curl tar + - name: Install editorconfig-checker + env: + VERSION: 2.6.0 + OS: linux + ARCH: amd64 + run: | + curl -O -L -C - https://github.com/editorconfig-checker/editorconfig-checker/releases/download/$VERSION/ec-$OS-$ARCH.tar.gz + tar xzf ec-$OS-$ARCH.tar.gz + sudo mv ./bin/ec-$OS-$ARCH /usr/bin/editorconfig-checker + sudo chmod +x /usr/bin/editorconfig-checker + - name: Install example site + run: ln -s ./docs/site-example ./site + - name: Lint editorconfig + run: make lint-editorconfig diff --git a/Makefile b/Makefile index 565a32a0..695b1bc7 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,10 @@ list-targets: FORCE echo "$$target" done -lint: lint-lua lint-sh +lint: lint-editorconfig lint-lua lint-sh + +lint-editorconfig: FORCE + @scripts/lint-editorconfig.sh lint-lua: FORCE @scripts/lint-lua.sh diff --git a/scripts/lint-editorconfig.sh b/scripts/lint-editorconfig.sh new file mode 100755 index 00000000..997ddd17 --- /dev/null +++ b/scripts/lint-editorconfig.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +editorconfig-checker .github contrib docs package scripts targets tests ./*.* .luacheckrc .editorconfig From 48b70a9ea5fc37da9accae81f20d1f624ab6e8e6 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 13 Sep 2020 19:22:06 +0200 Subject: [PATCH 2/5] contrib: Dockerfile: add editorconfig-checker Co-authored-by: Jan-Niklas Burfeind version bump to 2.6.0 aligned indentation --- contrib/docker/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index f003bafb..ffcd67de 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile @@ -24,6 +24,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +RUN mkdir /tmp/ec &&\ + wget -O /tmp/ec/ec-linux-amd64.tar.gz https://github.com/editorconfig-checker/editorconfig-checker/releases/download/2.6.0/ec-linux-amd64.tar.gz &&\ + tar -xvzf /tmp/ec/ec-linux-amd64.tar.gz &&\ + mv bin/ec-linux-amd64 /usr/local/bin/editorconfig-checker &&\ + rm -rf /tmp/ec + RUN useradd -d /gluon gluon USER gluon From f2d137b17add5d2014417435cae7fa9ce4b65c44 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Fri, 16 Dec 2022 19:37:13 +0100 Subject: [PATCH 3/5] editorconfig: add exceptions for Makefiles - [*.mk] - [Makefile] OpenWrt and Gluon use spaces for a better overview, tabs are used for `make` to mark recipes as such. --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index 64497f3a..43b19cec 100644 --- a/.editorconfig +++ b/.editorconfig @@ -35,6 +35,9 @@ indent_size = 2 [*.lua] +[{Makefile,*.mk}] +indent_style = unset + [*.md] indent_style = space indent_size = 4 From edc1260743f5810ba1a07397d1df15c37d65487c Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Tue, 3 Jan 2023 08:41:01 +0100 Subject: [PATCH 4/5] editorconfig: add siteconf --- .editorconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.editorconfig b/.editorconfig index 43b19cec..ce8045a5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -61,3 +61,7 @@ indent_size = 2 [CMakeLists.txt] indent_style = space indent_size = 2 + +[{docs,contrib/ci}/*site*/**/*.conf] +indent_style = space +indent_size = 2 From 17f94663a25564bf8a294bab49d955861a9db195 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Thu, 12 Jan 2023 23:56:50 +0100 Subject: [PATCH 5/5] targets: fix indentation --- targets/ramips-mt7621 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/ramips-mt7621 b/targets/ramips-mt7621 index 536c932c..4e6e1cff 100644 --- a/targets/ramips-mt7621 +++ b/targets/ramips-mt7621 @@ -66,7 +66,7 @@ device('ubiquiti-unifi-6-lite', 'ubnt_unifi-6-lite', { -- Wavlink device('wavlink-ws-wn572hp3-4g', 'wavlink_ws-wn572hp3-4g', { - factory = false, + factory = false, }) -- Xiaomi