From a8b2bf86692bd86d474215080ba64856f8b1a644 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 26 Mar 2024 20:33:42 +0100 Subject: [PATCH 1/2] New process alignment --- .github/linters/.markdown-lint.yml | 25 +++++++++++++++++++++++++ .github/workflows/Linter.yml | 25 +++++++++++++++++++++++++ .github/workflows/Process-PSModule.yml | 1 + src/WoW/WoW.psd1 | 1 - 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/linters/.markdown-lint.yml create mode 100644 .github/workflows/Linter.yml diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000..b9ecdfa --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,25 @@ +########################### +## Markdown Linter rules ## +########################### + +# Linter rules doc: +# - https://github.com/DavidAnson/markdownlint + +############### +# Rules by id # +############### +MD004: false # Unordered list style +MD007: + indent: 2 # Unordered list indentation +MD013: + line_length: 808 # Line length +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 diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml new file mode 100644 index 0000000..cfd32e6 --- /dev/null +++ b/.github/workflows/Linter.yml @@ -0,0 +1,25 @@ +name: Linter + +run-name: "Linter - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" + +on: [pull_request] + +permissions: + contents: read + packages: read + statuses: write # To report GitHub Actions status checks + +jobs: + Lint: + name: Lint code base + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Lint code base + uses: super-linter/super-linter@latest + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/Process-PSModule.yml b/.github/workflows/Process-PSModule.yml index b14321b..b81c41b 100644 --- a/.github/workflows/Process-PSModule.yml +++ b/.github/workflows/Process-PSModule.yml @@ -19,6 +19,7 @@ concurrency: permissions: contents: write pull-requests: write + statuses: write jobs: Process-PSModule: diff --git a/src/WoW/WoW.psd1 b/src/WoW/WoW.psd1 index 1fd44db..5a70936 100644 --- a/src/WoW/WoW.psd1 +++ b/src/WoW/WoW.psd1 @@ -16,4 +16,3 @@ } } } - From 81b38204c36ca6f0da7e4428a429b751b58ef376 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 26 Mar 2024 21:46:36 +0100 Subject: [PATCH 2/2] fix --- .vscode/extensions.json | 6 -- .vscode/settings.json | 81 ----------------------- src/WoW/WoW.psd1 | 17 +---- src/WoW/private/Core/Write-WoWWarning.ps1 | 2 - src/WoW/scripts/Initialize.ps1 | 7 -- 5 files changed, 1 insertion(+), 112 deletions(-) delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/settings.json delete mode 100644 src/WoW/scripts/Initialize.ps1 diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 038896b..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "recommendations": [ - "github.vscode-github-actions", - "ms-vscode.powershell" - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e732ea1..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "[json]": { - "editor.defaultFormatter": "vscode.json-language-features" - }, - "[jsonc]": { - "editor.defaultFormatter": "vscode.json-language-features" - }, - "[markdown]": { - "editor.defaultFormatter": "yzhang.markdown-all-in-one", - "editor.quickSuggestions": { - "comments": "off", - "other": "off", - "strings": "off" - }, - "editor.wordWrap": "off" - }, - "[powershell]": { - "editor.defaultFormatter": "ms-vscode.powershell", - "editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?", - "files.encoding": "utf8bom" - }, - "[yaml]": { - "editor.defaultFormatter": "github.vscode-github-actions", - "editor.insertSpaces": true, - "editor.tabSize": 2, - }, - "[github-actions-workflow]": { - "editor.defaultFormatter": "github.vscode-github-actions", - "editor.insertSpaces": true, - "editor.tabSize": 2 - }, - "editor.rulers": [0, 150], - "powershell.codeFormatting.autoCorrectAliases": true, - "powershell.codeFormatting.newLineAfterCloseBrace": false, - "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline", - "powershell.codeFormatting.preset": "OTBS", - "powershell.codeFormatting.trimWhitespaceAroundPipe": true, - "powershell.codeFormatting.useConstantStrings": true, - "powershell.codeFormatting.useCorrectCasing": true, - "powershell.codeFormatting.whitespaceBetweenParameters": true, - "powershell.pester.codeLens": false, - "powershell.powerShellDefaultVersion": "PowerShell (x64)", - "powershell.scriptAnalysis.enable": true, - "todo-tree.general.tags": [ - "BUG", - "HACK", - "FIXME", - "TODO", - "DEBUG" - ], - "todo-tree.highlights.customHighlight": { - "TODO": { - "background": "#00ff00", - "foreground": "#ffffff", - "icon": "alert", - "iconColour": "#00ff00", - "type": "text-and-comment" - }, - "HACK": { - "background": "#ff0000", - "foreground": "#ffffff", - "icon": "alert", - "iconColour": "#ff0000", - "type": "text-and-comment" - }, - "FIXME": { - "background": "#ff0000", - "foreground": "#ffffff", - "icon": "alert", - "iconColour": "#ff0000", - "type": "text-and-comment" - }, - "BUG": { - "background": "#ff0000", - "foreground": "#ffffff", - "icon": "alert", - "iconColour": "#ff0000", - "type": "text-and-comment" - } - } -} diff --git a/src/WoW/WoW.psd1 b/src/WoW/WoW.psd1 index 5a70936..091c824 100644 --- a/src/WoW/WoW.psd1 +++ b/src/WoW/WoW.psd1 @@ -1,18 +1,3 @@ @{ - ModuleVersion = '0.0.1' - Description = 'This module is for working with settings and addons in WoW with PowerShell' - HelpInfoURI = 'https://PSModule.github.io/WoW' - PrivateData = @{ - PSData = @{ - Tags = @( - 'WoW' - 'retail' - 'Games' - 'Multiboxing' - ) - LicenseUri = 'https://github.com/PSModule/WoW/blob/main/LICENSE' - ProjectUri = 'https://github.com/PSModule/WoW' - IconUri = 'https://raw.githubusercontent.com/PSModule/WoW/main/icon/icon.png' - } - } + ModuleVersion = '0.0.0' } diff --git a/src/WoW/private/Core/Write-WoWWarning.ps1 b/src/WoW/private/Core/Write-WoWWarning.ps1 index 420794d..81aae06 100644 --- a/src/WoW/private/Core/Write-WoWWarning.ps1 +++ b/src/WoW/private/Core/Write-WoWWarning.ps1 @@ -1,5 +1,3 @@ -#Requires -Version 7.0 - Function Write-WoWWarning { <# .SYNOPSIS diff --git a/src/WoW/scripts/Initialize.ps1 b/src/WoW/scripts/Initialize.ps1 deleted file mode 100644 index 1d2b980..0000000 --- a/src/WoW/scripts/Initialize.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -if ([string]::IsNullOrEmpty($ExampleState)) { - Write-Verbose 'Example not initialized.' - Write-Verbose 'Initializing now...' - $ExampleState = 'Initialized' -} else { - Write-Verbose 'Example already initialized.' -}