From b332f0c584d6cf91ec5e9fcc602f439455b31feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Wed, 29 Jun 2022 13:18:44 +0200 Subject: [PATCH] Add editorconfig-checker workflow and fix styling errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .editorconfig | 10 ++++++++-- .github/workflows/editorconfig-checker.yml | 14 ++++++++++++++ padd.sh | 6 +++--- 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/editorconfig-checker.yml diff --git a/.editorconfig b/.editorconfig index 66c982b..a23c978 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,11 +5,17 @@ root = true [*] insert_final_newline = true -indent_style = tab -indent_size = 4 +indent_style = space +indent_size = tab +tab_width = 4 charset = utf-8 trim_trailing_whitespace = true [*.yml] indent_style = space indent_size = 2 + +[*.md] +indent_style = space +indent_size = 2 + diff --git a/.github/workflows/editorconfig-checker.yml b/.github/workflows/editorconfig-checker.yml new file mode 100644 index 0000000..37b20ba --- /dev/null +++ b/.github/workflows/editorconfig-checker.yml @@ -0,0 +1,14 @@ +name: editorconfig-checker + +on: + pull_request: + push: + +jobs: + build: + name: editorconfig-checker + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: editorconfig-checker/action-editorconfig-checker@main + - run: editorconfig-checker diff --git a/padd.sh b/padd.sh index cbe80e6..5b5d6a9 100755 --- a/padd.sh +++ b/padd.sh @@ -523,7 +523,7 @@ GetVersionInformation() { if [ "$INSTALL_WEB_INTERFACE" = true ]; then web_version=$(pihole -v -a | awk '{print $4}' | tr -d '[:alpha:]') web_version_latest=$(pihole -v -a | awk '{print $(NF)}' | tr -d ')') - + # if web_version is something else then x.xx set it to N/A if ! echo "${web_version}" | grep -qE '^[0-9]+([.][0-9]+)?$' || [ "${web_version_latest}" = "ERROR" ]; then web_version="N/A" @@ -550,7 +550,7 @@ GetVersionInformation() { # Gather FTL version information... ftl_version=$(pihole -v -f | awk '{print $4}' | tr -d '[:alpha:]') ftl_version_latest=$(pihole -v -f | awk '{print $(NF)}' | tr -d ')') - + # if ftl_version is something else then x.xx set it to N/A if ! echo "${ftl_version}" | grep -qE '^[0-9]+([.][0-9]+)?$' || [ "${ftl_version_latest}" = "ERROR" ]; then ftl_version="N/A" @@ -892,7 +892,7 @@ PrintSystemInformation() { CleanEcho "${bold_text}SYSTEM ========================================================================${reset_text}" # Device CleanPrintf " %-10s%-39s\e[0K\\n" "Device:" "${sys_model}" - + # Uptime and memory CleanPrintf " %-10s%-39s %-10s[${memory_heatmap}%-10s${reset_text}] %-6s\\n" "Uptime:" "${system_uptime}" "Memory:" "${memory_bar}" "${memory_percent}%"