From 73d5902bedecba0e1ac5a5adc36c84d7fc1a233b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 27 Jun 2022 00:06:13 +0200 Subject: [PATCH] Add editorconfig-checker workflow Add yml style to editorconfig Add markdown styling to editorconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .editorconfig | 6 ++++++ .github/workflows/editorconfig-checker.yml | 14 ++++++++++++++ CONTRIBUTING.md | 2 -- .../database_migration/gravity/11_to_12.sql | 2 +- .../database_migration/gravity/12_to_13.sql | 2 +- .../Scripts/database_migration/gravity/3_to_4.sql | 2 +- .../Scripts/database_migration/gravity/4_to_5.sql | 2 +- advanced/Scripts/utils.sh | 2 +- 8 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/editorconfig-checker.yml diff --git a/.editorconfig b/.editorconfig index 33448755..714ed210 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,3 +12,9 @@ indent_size = tab tab_width = 4 charset = utf-8 trim_trailing_whitespace = true + +[*.yml] +tab_width = 2 + +[*.md] +tab_width = 2 diff --git a/.github/workflows/editorconfig-checker.yml b/.github/workflows/editorconfig-checker.yml new file mode 100644 index 00000000..37b20ba3 --- /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/CONTRIBUTING.md b/CONTRIBUTING.md index 018b8c5f..1ea98df2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,5 +3,3 @@ Please read and understand the contribution guide before creating an issue or pull request. The guide can be found here: [https://docs.pi-hole.net/guides/github/contributing/](https://docs.pi-hole.net/guides/github/contributing/) - - diff --git a/advanced/Scripts/database_migration/gravity/11_to_12.sql b/advanced/Scripts/database_migration/gravity/11_to_12.sql index 45fbc845..d480d46e 100644 --- a/advanced/Scripts/database_migration/gravity/11_to_12.sql +++ b/advanced/Scripts/database_migration/gravity/11_to_12.sql @@ -16,4 +16,4 @@ CREATE TRIGGER tr_group_zero AFTER DELETE ON "group" UPDATE info SET value = 12 WHERE property = 'version'; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/advanced/Scripts/database_migration/gravity/12_to_13.sql b/advanced/Scripts/database_migration/gravity/12_to_13.sql index d16791d6..7d85cb05 100644 --- a/advanced/Scripts/database_migration/gravity/12_to_13.sql +++ b/advanced/Scripts/database_migration/gravity/12_to_13.sql @@ -15,4 +15,4 @@ CREATE TRIGGER tr_adlist_update AFTER UPDATE OF address,enabled,comment ON adlis UPDATE info SET value = 13 WHERE property = 'version'; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/advanced/Scripts/database_migration/gravity/3_to_4.sql b/advanced/Scripts/database_migration/gravity/3_to_4.sql index 352b1baa..05231f72 100644 --- a/advanced/Scripts/database_migration/gravity/3_to_4.sql +++ b/advanced/Scripts/database_migration/gravity/3_to_4.sql @@ -93,4 +93,4 @@ CREATE VIEW vw_regex_blacklist AS SELECT domain, domainlist.id AS id, domainlist UPDATE info SET value = 4 WHERE property = 'version'; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/advanced/Scripts/database_migration/gravity/4_to_5.sql b/advanced/Scripts/database_migration/gravity/4_to_5.sql index 2ad906fc..4ae9f980 100644 --- a/advanced/Scripts/database_migration/gravity/4_to_5.sql +++ b/advanced/Scripts/database_migration/gravity/4_to_5.sql @@ -35,4 +35,4 @@ CREATE TABLE client_by_group UPDATE info SET value = 5 WHERE property = 'version'; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/advanced/Scripts/utils.sh b/advanced/Scripts/utils.sh index bdd238c3..cf24c098 100755 --- a/advanced/Scripts/utils.sh +++ b/advanced/Scripts/utils.sh @@ -89,7 +89,7 @@ getFTLAPIPort(){ # -s: FILE exists and has a size greater than zero ftl_api_port=$(cat "${PORTFILE}") # Exploit prevention: unset the variable if there is malicious content - # Verify that the value read from the file is numeric + # Verify that the value read from the file is numeric expr "$ftl_api_port" : "[^[:digit:]]" > /dev/null && unset ftl_api_port fi