From a482b409afed060ea9b836a55b95deb45e7d3256 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:43:16 +0200 Subject: [PATCH 01/28] Initial workflow --- .github/workflows/code-review.yml | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/code-review.yml diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml new file mode 100644 index 0000000..7559ac4 --- /dev/null +++ b/.github/workflows/code-review.yml @@ -0,0 +1,55 @@ +--- + name: Code Review - Linting & Link Checks + + on: + pull_request: + branches: + - main + workflow_dispatch: {} + + jobs: + lint: + name: Lint code base + runs-on: ubuntu-latest + + steps: + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run github/super-linter + uses: github/super-linter@v4 + env: + # Lint all code - disabled in as part of #262 + VALIDATE_ALL_CODEBASE: false + # Need to define main branch as default is set to master in super-linter + DEFAULT_BRANCH: main + # Enable setting the status of each individual linter run in the Checks section of a pull request + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # The following linter types will be enabled: + VALIDATE_JSON: true + VALIDATE_MARKDOWN: true + VALIDATE_POWERSHELL: true + VALIDATE_YAML: true + #VALIDATE_EDITORCONFIG: true + # Added exclusion in workflow for generated documentation. PR #304 + #FILTER_REGEX_EXCLUDE: (.*generateddocs/.*.bicep.md$|.*.tests.ps1) + + # markdown-link-check: + # name: Markdown Link Check + # runs-on: ubuntu-latest + + # steps: + # - name: Checkout code + # uses: actions/checkout@master + # with: + # fetch-depth: 0 + + # - name: Check links in markdown files + # uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 + # with: + # config-file: ".github/actions-config/mlc_config.json" + # use-verbose-mode: "yes" + # use-quiet-mode: "yes" \ No newline at end of file From 0b8c35f54b7fa08848b009613a5646b1ae193bd2 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:49:32 +0200 Subject: [PATCH 02/28] Full review --- .github/workflows/code-review.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 7559ac4..4d36d01 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -1,13 +1,13 @@ --- - name: Code Review - Linting & Link Checks - - on: - pull_request: - branches: - - main - workflow_dispatch: {} - - jobs: +name: Code Review - Linting & Link Checks + +on: + pull_request: + branches: + - main + workflow_dispatch: {} + +jobs: lint: name: Lint code base runs-on: ubuntu-latest @@ -23,7 +23,7 @@ uses: github/super-linter@v4 env: # Lint all code - disabled in as part of #262 - VALIDATE_ALL_CODEBASE: false + VALIDATE_ALL_CODEBASE: true # Need to define main branch as default is set to master in super-linter DEFAULT_BRANCH: main # Enable setting the status of each individual linter run in the Checks section of a pull request From d17886ad20ce14a45906cf335b4eb08fbac8c2cb Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:55:06 +0200 Subject: [PATCH 03/28] remove all review --- .github/workflows/code-review.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 4d36d01..c1aed73 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -23,7 +23,7 @@ jobs: uses: github/super-linter@v4 env: # Lint all code - disabled in as part of #262 - VALIDATE_ALL_CODEBASE: true + VALIDATE_ALL_CODEBASE: false # Need to define main branch as default is set to master in super-linter DEFAULT_BRANCH: main # Enable setting the status of each individual linter run in the Checks section of a pull request @@ -34,8 +34,6 @@ jobs: VALIDATE_POWERSHELL: true VALIDATE_YAML: true #VALIDATE_EDITORCONFIG: true - # Added exclusion in workflow for generated documentation. PR #304 - #FILTER_REGEX_EXCLUDE: (.*generateddocs/.*.bicep.md$|.*.tests.ps1) # markdown-link-check: # name: Markdown Link Check From 88aed9bf85dc35787d667b5e7f01abcc87b4b352 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:24:50 +0200 Subject: [PATCH 04/28] Add linmk check --- .github/actions-config/mlc-config.json | 27 +++++++++++++++++++++++ .github/workflows/code-review.yml | 30 +++++++++++++------------- 2 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 .github/actions-config/mlc-config.json diff --git a/.github/actions-config/mlc-config.json b/.github/actions-config/mlc-config.json new file mode 100644 index 0000000..afea9b6 --- /dev/null +++ b/.github/actions-config/mlc-config.json @@ -0,0 +1,27 @@ +{ + "ignorePatterns": [ + { + "pattern": "^http://localhost" + } + ], + "httpHeaders": [ + { + "comment": "Workaround as suggested here: https://github.com/tcort/markdown-link-check/issues/201", + "urls": [ + "https://docs.github.com/" + ], + "headers": { + "Accept-Encoding": "zstd, br, gzip, deflate" + } + } + ], + "timeout": "10s", + "retryOn429": true, + "retryCount": 5, + "fallbackRetryDelay": "30s", + "aliveStatusCodes": [ + 200, + 203, + 206 + ] + } \ No newline at end of file diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index c1aed73..2d81ca0 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -5,7 +5,7 @@ on: pull_request: branches: - main - workflow_dispatch: {} + workflow_dispatch: { } jobs: lint: @@ -35,19 +35,19 @@ jobs: VALIDATE_YAML: true #VALIDATE_EDITORCONFIG: true - # markdown-link-check: - # name: Markdown Link Check - # runs-on: ubuntu-latest + markdown-link-check: + name: Markdown Link Check + runs-on: ubuntu-latest - # steps: - # - name: Checkout code - # uses: actions/checkout@master - # with: - # fetch-depth: 0 + steps: + - name: Checkout code + uses: actions/checkout@master + with: + fetch-depth: 0 - # - name: Check links in markdown files - # uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 - # with: - # config-file: ".github/actions-config/mlc_config.json" - # use-verbose-mode: "yes" - # use-quiet-mode: "yes" \ No newline at end of file + - name: Check links in markdown files + uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 + with: + config-file: ".github/actions-config/mlc_config.json" + use-verbose-mode: "yes" + use-quiet-mode: "yes" \ No newline at end of file From 2275f9ad3142d4b04f4f4566dcd1fdf7ab890120 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 27 Aug 2024 14:22:50 +0200 Subject: [PATCH 05/28] check modified files only --- .github/workflows/code-review.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 2d81ca0..051bb96 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -46,8 +46,9 @@ jobs: fetch-depth: 0 - name: Check links in markdown files - uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 + uses: gaurav-nelson/github-action-markdown-link-check@v1 with: config-file: ".github/actions-config/mlc_config.json" use-verbose-mode: "yes" - use-quiet-mode: "yes" \ No newline at end of file + use-quiet-mode: "yes" + check-modified-files-only : "yes" \ No newline at end of file From ff7dae0b0fbd8672703c25ff85efba2df98af019 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 27 Aug 2024 14:29:33 +0200 Subject: [PATCH 06/28] switch to linkspector --- .../{mlc-config.json => mlc_config.json} | 0 .github/workflows/code-review.yml | 11 +++++------ 2 files changed, 5 insertions(+), 6 deletions(-) rename .github/actions-config/{mlc-config.json => mlc_config.json} (100%) diff --git a/.github/actions-config/mlc-config.json b/.github/actions-config/mlc_config.json similarity index 100% rename from .github/actions-config/mlc-config.json rename to .github/actions-config/mlc_config.json diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 051bb96..e9bab76 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -45,10 +45,9 @@ jobs: with: fetch-depth: 0 - - name: Check links in markdown files - uses: gaurav-nelson/github-action-markdown-link-check@v1 + - name: Run linkspector + uses: umbrelladocs/action-linkspector@v1 with: - config-file: ".github/actions-config/mlc_config.json" - use-verbose-mode: "yes" - use-quiet-mode: "yes" - check-modified-files-only : "yes" \ No newline at end of file + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_on_error: true \ No newline at end of file From 5eda70840881abb3e689e452de68b1af22c0f21f Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:44:43 +0200 Subject: [PATCH 07/28] Add config --- .github/actions-config/.linkspector.yml | 16 +++++++++++++++ .github/actions-config/mlc_config.json | 27 ------------------------- .github/workflows/code-review.yml | 3 ++- 3 files changed, 18 insertions(+), 28 deletions(-) create mode 100644 .github/actions-config/.linkspector.yml delete mode 100644 .github/actions-config/mlc_config.json diff --git a/.github/actions-config/.linkspector.yml b/.github/actions-config/.linkspector.yml new file mode 100644 index 0000000..9fcaa68 --- /dev/null +++ b/.github/actions-config/.linkspector.yml @@ -0,0 +1,16 @@ +dirs: + - ./ +#baseUrl: https://example.com +# ignorePatterns: +# - pattern: '^https://example.com/skip/.*$' +# - pattern: "^(ftp)://[^\\s/$?#]*\\.[^\\s]*$" +# replacementPatterns: +# - pattern: "(https?://example.com)/(\\w+)/(\\d+)" +# replacement: '$1/id/$3' +# - pattern: "\\[([^\\]]+)\\]\\((https?://example.com)/file\\)" +# replacement: '$1' +aliveStatusCodes: + - 200 + - 201 + - 204 +useGitIgnore: true \ No newline at end of file diff --git a/.github/actions-config/mlc_config.json b/.github/actions-config/mlc_config.json deleted file mode 100644 index afea9b6..0000000 --- a/.github/actions-config/mlc_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "ignorePatterns": [ - { - "pattern": "^http://localhost" - } - ], - "httpHeaders": [ - { - "comment": "Workaround as suggested here: https://github.com/tcort/markdown-link-check/issues/201", - "urls": [ - "https://docs.github.com/" - ], - "headers": { - "Accept-Encoding": "zstd, br, gzip, deflate" - } - } - ], - "timeout": "10s", - "retryOn429": true, - "retryCount": 5, - "fallbackRetryDelay": "30s", - "aliveStatusCodes": [ - 200, - 203, - 206 - ] - } \ No newline at end of file diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index e9bab76..54107dc 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -50,4 +50,5 @@ jobs: with: github_token: ${{ secrets.github_token }} reporter: github-pr-review - fail_on_error: true \ No newline at end of file + fail_on_error: true + config_file: ".github/actions-config/.linkspector.yml" \ No newline at end of file From ef4db2a112c16020c494abb92ed57e23e8740e60 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:53:01 +0200 Subject: [PATCH 08/28] check all --- .github/actions-config/.linkspector.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions-config/.linkspector.yml b/.github/actions-config/.linkspector.yml index 9fcaa68..d40e92c 100644 --- a/.github/actions-config/.linkspector.yml +++ b/.github/actions-config/.linkspector.yml @@ -13,4 +13,5 @@ aliveStatusCodes: - 200 - 201 - 204 -useGitIgnore: true \ No newline at end of file +useGitIgnore: true +modifiedFilesOnly: false \ No newline at end of file From 1a6aa5ba39ee24bc0b0ff242f1a67b364736797d Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:05:26 +0200 Subject: [PATCH 09/28] path --- .github/actions-config/.linkspector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions-config/.linkspector.yml b/.github/actions-config/.linkspector.yml index d40e92c..b09eeae 100644 --- a/.github/actions-config/.linkspector.yml +++ b/.github/actions-config/.linkspector.yml @@ -1,5 +1,5 @@ dirs: - - ./ + - / #baseUrl: https://example.com # ignorePatterns: # - pattern: '^https://example.com/skip/.*$' From e4a6af6112e5032ccb5dba872f33effbc5396057 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:12:55 +0200 Subject: [PATCH 10/28] path2 --- .github/actions-config/.linkspector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions-config/.linkspector.yml b/.github/actions-config/.linkspector.yml index b09eeae..9683a0f 100644 --- a/.github/actions-config/.linkspector.yml +++ b/.github/actions-config/.linkspector.yml @@ -1,5 +1,5 @@ dirs: - - / + - ./docs #baseUrl: https://example.com # ignorePatterns: # - pattern: '^https://example.com/skip/.*$' From c7c19c8b27a30dc48e2785c0ba3b492b08432076 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:15:51 +0200 Subject: [PATCH 11/28] test file --- .github/actions-config/.linkspector.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions-config/.linkspector.yml b/.github/actions-config/.linkspector.yml index 9683a0f..d40e92c 100644 --- a/.github/actions-config/.linkspector.yml +++ b/.github/actions-config/.linkspector.yml @@ -1,5 +1,5 @@ dirs: - - ./docs + - ./ #baseUrl: https://example.com # ignorePatterns: # - pattern: '^https://example.com/skip/.*$' diff --git a/README.md b/README.md index 29bb15d..db18dac 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For step by step instructions on how to deploy the above scenarios, please see t Please note that the code in this GitHub repository is currently in development and may be subject to frequent changes and updates. This means that the functionality and features of the code may change without notice. As such, you are advised to ensure that the code is tested thoroughly in a test environment before considering moving to production. -Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issues), and we will get back to you as soon as possible. +Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issuesdsds), and we will get back to you as soon as possible. By accessing or using the code in this repository, you agree to assume all risks associated with its use and to use it at your own discretion and risk. Microsoft shall not be liable for any damages or losses resulting from the use of this code. For support details, please see the [Support section](./SUPPORT.md). From bce74a069e9a3de7deed8fae682b6e96a06a7df3 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:22:41 +0200 Subject: [PATCH 12/28] reset --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index db18dac..29bb15d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For step by step instructions on how to deploy the above scenarios, please see t Please note that the code in this GitHub repository is currently in development and may be subject to frequent changes and updates. This means that the functionality and features of the code may change without notice. As such, you are advised to ensure that the code is tested thoroughly in a test environment before considering moving to production. -Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issuesdsds), and we will get back to you as soon as possible. +Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issues), and we will get back to you as soon as possible. By accessing or using the code in this repository, you agree to assume all risks associated with its use and to use it at your own discretion and risk. Microsoft shall not be liable for any damages or losses resulting from the use of this code. For support details, please see the [Support section](./SUPPORT.md). From 9d0387d9089115fcc7f21cfb283a41333507a8fa Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:34:50 +0200 Subject: [PATCH 13/28] test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 29bb15d..eecaf58 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Please note that the code in this GitHub repository is currently in development Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issues), and we will get back to you as soon as possible. -By accessing or using the code in this repository, you agree to assume all risks associated with its use and to use it at your own discretion and risk. Microsoft shall not be liable for any damages or losses resulting from the use of this code. For support details, please see the [Support section](./SUPPORT.md). +By accessing or using the code in this repository, you agree to assume all risks associated with its use and to use it at your own discretion and risk. Microsoft shall not be liable for any damages or losses resulting from the use of this code. For support details, please see the [Support section](./34234SUPPORT.md). ## Wiki From 41e03e312899e332f1d9f90435a8a9c90f3867b3 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:44:24 +0200 Subject: [PATCH 14/28] test 2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eecaf58..4b44619 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For step by step instructions on how to deploy the above scenarios, please see t Please note that the code in this GitHub repository is currently in development and may be subject to frequent changes and updates. This means that the functionality and features of the code may change without notice. As such, you are advised to ensure that the code is tested thoroughly in a test environment before considering moving to production. -Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issues), and we will get back to you as soon as possible. +Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issues ), and we will get back to you as soon as possible. By accessing or using the code in this repository, you agree to assume all risks associated with its use and to use it at your own discretion and risk. Microsoft shall not be liable for any damages or losses resulting from the use of this code. For support details, please see the [Support section](./34234SUPPORT.md). From 95ea1b879972a3eee358355f903a56af7790c98f Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:08:12 +0200 Subject: [PATCH 15/28] test pr feedback --- .github/workflows/code-review.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 54107dc..fefed7b 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -38,6 +38,9 @@ jobs: markdown-link-check: name: Markdown Link Check runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Checkout code From e2d864dc11de3d8b69bbdd03152196a44f3fc507 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:42:19 +0200 Subject: [PATCH 16/28] remove permissions --- .github/workflows/code-review.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index fefed7b..54107dc 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -38,9 +38,6 @@ jobs: markdown-link-check: name: Markdown Link Check runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write steps: - name: Checkout code From 86879bdfbb6579ddd948c9d5844dd503e5e9cc8c Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:03:09 +0200 Subject: [PATCH 17/28] Versions --- .github/workflows/code-review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 54107dc..d04228b 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -20,7 +20,7 @@ jobs: fetch-depth: 0 - name: Run github/super-linter - uses: github/super-linter@v4 + uses: github/super-linter@v7 env: # Lint all code - disabled in as part of #262 VALIDATE_ALL_CODEBASE: false @@ -46,7 +46,7 @@ jobs: fetch-depth: 0 - name: Run linkspector - uses: umbrelladocs/action-linkspector@v1 + uses: umbrelladocs/action-linkspector@v1.2.0 with: github_token: ${{ secrets.github_token }} reporter: github-pr-review From c091d382e8a8fa1f915e957dcbed183466f3895d Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:10:04 +0200 Subject: [PATCH 18/28] superlinter check --- .github/workflows/code-review.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index d04228b..3aefe02 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -20,7 +20,7 @@ jobs: fetch-depth: 0 - name: Run github/super-linter - uses: github/super-linter@v7 + uses: github/super-linter@v4 env: # Lint all code - disabled in as part of #262 VALIDATE_ALL_CODEBASE: false @@ -34,6 +34,30 @@ jobs: VALIDATE_POWERSHELL: true VALIDATE_YAML: true #VALIDATE_EDITORCONFIG: true + + lint2: + name: Lint2 + runs-on: ubuntu-latest + + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + #statuses: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + # super-linter needs the full git history to get the + # list of files that changed across commits + fetch-depth: 0 + + - name: Super-linter + uses: super-linter/super-linter@v7.1.0 # x-release-please-version + env: + # To report GitHub Actions status checks + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} markdown-link-check: name: Markdown Link Check From 4aca77fbfab3ca0b7de4bd84f6bc9b2cfcce4e49 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:17:27 +0200 Subject: [PATCH 19/28] switch back to existing linter --- .github/workflows/code-review.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 3aefe02..8d40670 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -34,30 +34,6 @@ jobs: VALIDATE_POWERSHELL: true VALIDATE_YAML: true #VALIDATE_EDITORCONFIG: true - - lint2: - name: Lint2 - runs-on: ubuntu-latest - - permissions: - contents: read - packages: read - # To report GitHub Actions status checks - #statuses: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - # super-linter needs the full git history to get the - # list of files that changed across commits - fetch-depth: 0 - - - name: Super-linter - uses: super-linter/super-linter@v7.1.0 # x-release-please-version - env: - # To report GitHub Actions status checks - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} markdown-link-check: name: Markdown Link Check From 1c5bbb589131bf298790a28b081f85ad19305f82 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:24:24 +0200 Subject: [PATCH 20/28] linter --- .github/workflows/code-review.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 8d40670..4c68953 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -20,7 +20,7 @@ jobs: fetch-depth: 0 - name: Run github/super-linter - uses: github/super-linter@v4 + uses: github/super-linter@v4.9.5 env: # Lint all code - disabled in as part of #262 VALIDATE_ALL_CODEBASE: false @@ -34,6 +34,8 @@ jobs: VALIDATE_POWERSHELL: true VALIDATE_YAML: true #VALIDATE_EDITORCONFIG: true + # Disable errors to only generate a report + DISABLE_ERRORS: true markdown-link-check: name: Markdown Link Check From a9e66716bf858c9a3278eef78f15da7ca09b944e Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:24:36 +0200 Subject: [PATCH 21/28] Linter rules --- .github/linters/.markdown-lint.yml | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/linters/.markdown-lint.yml diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000..764e930 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,35 @@ +--- +########################### +########################### +## Markdown Linter rules ## +########################### +########################### + +# Linter rules doc: +# - https://github.com/DavidAnson/markdownlint +# +# Note: +# To comment out a single error: +# +# any violations you want +# +# + +############### +# Rules by id # +############### +MD004: false # Unordered list style +MD007: + indent: 2 # Unordered list indentation +MD013: + line_length: 900 # Line length 80 is far to short +MD026: + punctuation: ".,;:!。,;:" # List of not allowed +MD029: false # Ordered list item prefix +MD033: false # Allow inline HTML +MD036: false # Emphasis used instead of a heading + +################# +# Rules by tags # +################# +blank_lines: false # Error on blank lines \ No newline at end of file From 941fa91e65ee479aa52cc7e885d8bf944c8877bf Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:29:47 +0200 Subject: [PATCH 22/28] errors --- .github/workflows/code-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 4c68953..f518570 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -35,7 +35,7 @@ jobs: VALIDATE_YAML: true #VALIDATE_EDITORCONFIG: true # Disable errors to only generate a report - DISABLE_ERRORS: true + #DISABLE_ERRORS: true markdown-link-check: name: Markdown Link Check From 586ca635de1c379365a2d82eae80478365e591dd Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:40:48 +0200 Subject: [PATCH 23/28] linter warns --- .github/actions-config/.linkspector.yml | 1 + .github/workflows/code-review.yml | 95 ++++++++++++------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/actions-config/.linkspector.yml b/.github/actions-config/.linkspector.yml index d40e92c..2adcef3 100644 --- a/.github/actions-config/.linkspector.yml +++ b/.github/actions-config/.linkspector.yml @@ -1,3 +1,4 @@ +--- dirs: - ./ #baseUrl: https://example.com diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index f518570..434a748 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -1,56 +1,55 @@ --- name: Code Review - Linting & Link Checks - + on: pull_request: branches: - main - workflow_dispatch: { } + workflow_dispatch: {} jobs: - lint: - name: Lint code base - runs-on: ubuntu-latest - - steps: - - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Run github/super-linter - uses: github/super-linter@v4.9.5 - env: - # Lint all code - disabled in as part of #262 - VALIDATE_ALL_CODEBASE: false - # Need to define main branch as default is set to master in super-linter - DEFAULT_BRANCH: main - # Enable setting the status of each individual linter run in the Checks section of a pull request - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # The following linter types will be enabled: - VALIDATE_JSON: true - VALIDATE_MARKDOWN: true - VALIDATE_POWERSHELL: true - VALIDATE_YAML: true - #VALIDATE_EDITORCONFIG: true - # Disable errors to only generate a report - #DISABLE_ERRORS: true - - markdown-link-check: - name: Markdown Link Check - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@master - with: - fetch-depth: 0 - - - name: Run linkspector - uses: umbrelladocs/action-linkspector@v1.2.0 - with: - github_token: ${{ secrets.github_token }} - reporter: github-pr-review - fail_on_error: true - config_file: ".github/actions-config/.linkspector.yml" \ No newline at end of file + lint: + name: Lint code base + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run github/super-linter + uses: github/super-linter@v4.9.5 + env: + # Lint all code - disabled in as part of #262 + VALIDATE_ALL_CODEBASE: false + # Need to define main branch as default is set to master in super-linter + DEFAULT_BRANCH: main + # Enable setting the status of each individual linter run in the Checks section of a pull request + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # The following linter types will be enabled: + VALIDATE_JSON: true + VALIDATE_MARKDOWN: true + VALIDATE_POWERSHELL: true + VALIDATE_YAML: true + #VALIDATE_EDITORCONFIG: true + # Disable errors to only generate a report + #DISABLE_ERRORS: true + + markdown-link-check: + name: Markdown Link Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@master + with: + fetch-depth: 0 + + - name: Run linkspector + uses: umbrelladocs/action-linkspector@v1.2.0 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_on_error: true + config_file: ".github/actions-config/.linkspector.yml" From 7eda7d4f146343f229a324ffbb883ce673a5ad1d Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:21:59 +0200 Subject: [PATCH 24/28] fix readme --- .github/linters/.yamllint.yml | 5 +++++ .github/workflows/code-review.yml | 1 + README.md | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .github/linters/.yamllint.yml diff --git a/.github/linters/.yamllint.yml b/.github/linters/.yamllint.yml new file mode 100644 index 0000000..91d83c1 --- /dev/null +++ b/.github/linters/.yamllint.yml @@ -0,0 +1,5 @@ +rules: + line-length: + max: 150 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: false \ No newline at end of file diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 434a748..65d77a2 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -32,6 +32,7 @@ jobs: VALIDATE_MARKDOWN: true VALIDATE_POWERSHELL: true VALIDATE_YAML: true + YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yml #VALIDATE_EDITORCONFIG: true # Disable errors to only generate a report #DISABLE_ERRORS: true diff --git a/README.md b/README.md index 4b44619..29bb15d 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ For step by step instructions on how to deploy the above scenarios, please see t Please note that the code in this GitHub repository is currently in development and may be subject to frequent changes and updates. This means that the functionality and features of the code may change without notice. As such, you are advised to ensure that the code is tested thoroughly in a test environment before considering moving to production. -Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issues ), and we will get back to you as soon as possible. +Additionally you are advised to reach out to the authors of this repository to discuss the code and its suitability for your environment, before deploying it in production. To do so create an issue [here](https://github.com/alz-oracle/issues), and we will get back to you as soon as possible. -By accessing or using the code in this repository, you agree to assume all risks associated with its use and to use it at your own discretion and risk. Microsoft shall not be liable for any damages or losses resulting from the use of this code. For support details, please see the [Support section](./34234SUPPORT.md). +By accessing or using the code in this repository, you agree to assume all risks associated with its use and to use it at your own discretion and risk. Microsoft shall not be liable for any damages or losses resulting from the use of this code. For support details, please see the [Support section](./SUPPORT.md). ## Wiki From d8ac18ad95f825ad40fe805400442ffc187d0e52 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:30:31 +0200 Subject: [PATCH 25/28] move file around --- .github/{linters => }/.yamllint.yml | 1 + .github/workflows/code-review.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename .github/{linters => }/.yamllint.yml (96%) diff --git a/.github/linters/.yamllint.yml b/.github/.yamllint.yml similarity index 96% rename from .github/linters/.yamllint.yml rename to .github/.yamllint.yml index 91d83c1..5f38510 100644 --- a/.github/linters/.yamllint.yml +++ b/.github/.yamllint.yml @@ -1,3 +1,4 @@ +--- rules: line-length: max: 150 diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 65d77a2..847301e 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -32,7 +32,7 @@ jobs: VALIDATE_MARKDOWN: true VALIDATE_POWERSHELL: true VALIDATE_YAML: true - YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yml + #YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yml #VALIDATE_EDITORCONFIG: true # Disable errors to only generate a report #DISABLE_ERRORS: true From c09004d3b6ac0674c6144a1815b3ddb127c58807 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:39:54 +0200 Subject: [PATCH 26/28] waml lint config --- .github/{.yamllint.yml => linters/.yaml-lint.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{.yamllint.yml => linters/.yaml-lint.yml} (100%) diff --git a/.github/.yamllint.yml b/.github/linters/.yaml-lint.yml similarity index 100% rename from .github/.yamllint.yml rename to .github/linters/.yaml-lint.yml From f9193cde312288f0df449c11b26d512162e069bb Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:43:53 +0200 Subject: [PATCH 27/28] clear pr comments --- .github/workflows/code-review.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 847301e..f17df02 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -11,6 +11,9 @@ jobs: lint: name: Lint code base runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Checkout code From a6a3349d1cc4bb68461878315ddf7394467d3304 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:50:49 +0200 Subject: [PATCH 28/28] Remove permissions --- .github/workflows/code-review.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index f17df02..847301e 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -11,9 +11,6 @@ jobs: lint: name: Lint code base runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write steps: - name: Checkout code