From 8cb49fe0144fa9fbc3f47bf8dab279f6b48422eb Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Thu, 7 Nov 2024 04:55:02 +0100 Subject: [PATCH 1/9] Adding markdownlinter --- .github/workflows/markdownLint.yaml | 17 +++++++++++++++++ .markdownlint-cli2.yaml | 7 +++++++ 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/markdownLint.yaml create mode 100644 .markdownlint-cli2.yaml diff --git a/.github/workflows/markdownLint.yaml b/.github/workflows/markdownLint.yaml new file mode 100644 index 00000000..4b3ac755 --- /dev/null +++ b/.github/workflows/markdownLint.yaml @@ -0,0 +1,17 @@ +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: tj-actions/changed-files@v45 + id: changed-files + with: + files: '**/*.md' + - uses: DavidAnson/markdownlint-cli2-action@v17 + if: steps.changed-files.outputs.any_changed == 'true' + with: + globs: ${{ steps.changed-files.outputs.all_changed_files }} diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 00000000..407cacf9 --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,7 @@ +globs: + - "**/*.md" + +noProgress: true + +# Show found files on stdout (only valid at root) +showFound: true From 457a9930bba07359c873f9921c2ebe36864f8be3 Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Thu, 7 Nov 2024 04:56:46 +0100 Subject: [PATCH 2/9] Adding markdownlinter --- .github/workflows/markdownLint.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/markdownLint.yaml b/.github/workflows/markdownLint.yaml index 4b3ac755..83ff6966 100644 --- a/.github/workflows/markdownLint.yaml +++ b/.github/workflows/markdownLint.yaml @@ -1,4 +1,20 @@ -on: [push, pull_request] +name: Markdown Lint + +on: + push: + branches: + - '**' + tags-ignore: + - '**' + pull_request_target: + branches: + - '**' + tags-ignore: + - '**' + types: + - 'opened' + - 'reopened' + - 'synchronize' jobs: lint: From 3ce46f012718a071344a15d1d7ec3a26d6720166 Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Thu, 7 Nov 2024 04:58:44 +0100 Subject: [PATCH 3/9] Fix name --- .github/workflows/markdownLint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/markdownLint.yaml b/.github/workflows/markdownLint.yaml index 83ff6966..f9bf7b33 100644 --- a/.github/workflows/markdownLint.yaml +++ b/.github/workflows/markdownLint.yaml @@ -18,6 +18,7 @@ on: jobs: lint: + name: Check Markdown linting runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From ab5bc365b5a75e4b07a726b918a677c38c63574a Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Thu, 7 Nov 2024 04:59:09 +0100 Subject: [PATCH 4/9] Add recommendation to install extension --- .vscode/extensions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 33d1ff21..e942e8aa 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,7 @@ { "recommendations": [ "redhat.vscode-yaml", - "EditorConfig.EditorConfig" + "EditorConfig.EditorConfig", + "DavidAnson.vscode-markdownlint" ] } From 5c71b6373671ad49e334e0b377d71a5fb2a8f6c7 Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Thu, 7 Nov 2024 05:18:45 +0100 Subject: [PATCH 5/9] Gradually start Markdownlint --- .github/actions/spelling/advice.md | 1 + .markdownlint-cli2.yaml | 4 +++ .markdownlint.yaml | 35 +++++++++++++++++++ CONTRIBUTING.md | 5 ++- SECURITY.md | 16 ++++----- doc/index.md | 2 +- .../Microsoft.Dotnet.Dsc/DotNetToolPackage.md | 16 ++++----- .../Microsoft.VSCode.Dsc/VSCodeExtension.md | 12 +++---- resources/Help/PythonPip3Dsc/Pip3Package.md | 14 ++++---- 9 files changed, 74 insertions(+), 31 deletions(-) create mode 100644 .markdownlint.yaml diff --git a/.github/actions/spelling/advice.md b/.github/actions/spelling/advice.md index 1004eeaa..483b4e16 100644 --- a/.github/actions/spelling/advice.md +++ b/.github/actions/spelling/advice.md @@ -2,6 +2,7 @@
If the flagged items are :exploding_head: false positives If items relate to a ... + * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index 407cacf9..76170d4a 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -5,3 +5,7 @@ noProgress: true # Show found files on stdout (only valid at root) showFound: true + +ignores: + - "PRIVACY.md" + - ".github/*.md" diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 00000000..2d37bf1e --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,35 @@ +# Default state for all rules +default: true + +# Path to configuration file to extend +extends: null + +MD007: + # Spaces for indent + indent: 4 + # Whether to indent the first level of the list + start_indented: false + # Spaces for first level indent (when start_indented is set) + start_indent: 2 + +# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md +MD013: + # Number of characters + line_length: 500 + # Number of characters for headings + heading_line_length: 120 + # Number of characters for code blocks + code_block_line_length: 500 + # Include code blocks + code_blocks: true + # Include tables + tables: true + # Include headings + headings: true + # Strict length checking + strict: false + # Stern length checking + stern: false + +# MD025/single-title : Help examples contain metadata +MD025: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5a33cac4..ba0501cf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,9 @@ The Windows Package Manager team is active in this GitHub Repository. In fact, w When the team finds issues we file them in the repository. When we propose new ideas or think-up new features, we file new feature requests. When we work on fixes or features, we create branches and work on those improvements. And when PRs are reviewed, we review in public - including all the good, the bad, and the ugly parts. -The point of doing all this work in public is to ensure that we are holding ourselves to a high degree of transparency, and so that the community sees that we apply the same processes and hold ourselves to the same quality-bar as we do to community-submitted issues and PRs. We also want to make sure that we expose our team culture and "tribal knowledge" that is inherent in any closely-knit team, which often contains considerable value to those new to the project who are trying to figure out "why the heck does this thing look/work like this???" +The point of doing all this work in public is to ensure that we are holding ourselves to a high degree of transparency, and so that the community sees that we apply the same processes and hold ourselves to the same quality-bar as we do to community-submitted issues and PRs. + +We also want to make sure that we expose our team culture and "tribal knowledge" that is inherent in any closely-knit team, which often contains considerable value to those new to the project who are trying to figure out "why the heck does this thing look/work like this???" ### Repository Bot @@ -21,6 +23,7 @@ We drive the bot by tagging issues with specific labels which cause the bot engi Therefore, if you do file issues, or create PRs, please keep an eye on your GitHub notifications. If you do not respond to requests for information, your issues/PRs may be closed automatically. --- + ## Reporting Security Issues **Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to the Microsoft Security Response Center (MSRC). See [SECURITY.md](./SECURITY.md) for more information. diff --git a/SECURITY.md b/SECURITY.md index 82db58aa..d49d89e4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,6 +1,6 @@ -## Security +# Security Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin). @@ -18,13 +18,13 @@ You should receive a response within 24 hours. If for some reason you do not, pl Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue +* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) +* Full paths of source file(s) related to the manifestation of the issue +* The location of the affected source code (tag/branch/commit or direct URL) +* Any special configuration required to reproduce the issue +* Step-by-step instructions to reproduce the issue +* Proof-of-concept or exploit code (if possible) +* Impact of the issue, including how an attacker might exploit the issue This information will help us triage your report more quickly. diff --git a/doc/index.md b/doc/index.md index 1aa1c739..9066091f 100644 --- a/doc/index.md +++ b/doc/index.md @@ -7,7 +7,7 @@ ms.topic: overview WinGet Desired State Configuration (DSC) consist out of PowerShell class-based DSC resources targeting PowerShell 7.2+. Each module exposes classes that help you configure your machine in the desired state. The DSC resources is developed around the `Get-Test-Set` methods. If applicable, the team attempts to implement new methods known to newer versions of DSC. -> To learn more about the newer DSC version, check out https://learn.microsoft.com/en-us/powershell/dsc/overview?view=dsc-3.0 +> To learn more about the newer DSC version, check out ## Getting started diff --git a/resources/Help/Microsoft.Dotnet.Dsc/DotNetToolPackage.md b/resources/Help/Microsoft.Dotnet.Dsc/DotNetToolPackage.md index 65a39961..a84bcc70 100644 --- a/resources/Help/Microsoft.Dotnet.Dsc/DotNetToolPackage.md +++ b/resources/Help/Microsoft.Dotnet.Dsc/DotNetToolPackage.md @@ -19,14 +19,14 @@ The `DotNetToolPackage` DSC Resource allows you to install, update, and uninstal ## PARAMETERS -**Parameter**|**Attribute**|**DataType**|**Description**|**Allowed Values** -:-----|:-----|:-----|:-----|:----- -`PackageId`|Key|String|The ID of the .NET tool package to manage.|N/A -`Version`|Optional|String|The version of the .NET tool package to install. If not specified, the latest version will be installed.|N/A -`Commands`|Optional|String[]|An array of commands provided by the .NET tool package.|N/A -`Prerelease`|Optional|Boolean|Indicates whether to include prerelease versions of the .NET tool package. The default value is `$false`.|`$true`, `$false` -`ToolPathDirectory`|Optional|String|The directory where the .NET tool package will be installed. If not specified, the package will be installed globally.| Use custom directory when you have `env:Path` set on that directory -`Exist`|Optional|Boolean|Indicates whether the package should exist. Defaults to `$true`.| `$true` or `$false` +| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** | +| ------------------- | ------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | +| `PackageId` | Key | String | The ID of the .NET tool package to manage. | N/A | +| `Version` | Optional | String | The version of the .NET tool package to install. If not specified, the latest version will be installed. | N/A | +| `Commands` | Optional | String[] | An array of commands provided by the .NET tool package. | N/A | +| `Prerelease` | Optional | Boolean | Indicates whether to include prerelease versions of the .NET tool package. The default value is `$false`. | `$true`, `$false` | +| `ToolPathDirectory` | Optional | String | The directory where the .NET tool package will be installed. If not specified, the package will be installed globally. | Use custom directory when you have | +| `Exist` | Optional | Boolean | Indicates whether the package should exist. Defaults to `$true`. | `$true` or `$false` | ## EXAMPLES diff --git a/resources/Help/Microsoft.VSCode.Dsc/VSCodeExtension.md b/resources/Help/Microsoft.VSCode.Dsc/VSCodeExtension.md index 7d98592b..4f5e62b1 100644 --- a/resources/Help/Microsoft.VSCode.Dsc/VSCodeExtension.md +++ b/resources/Help/Microsoft.VSCode.Dsc/VSCodeExtension.md @@ -19,12 +19,12 @@ The `VSCodeExtension` DSC Resource allows you to install, update, and remove Vis ## PARAMETERS -**Parameter**|**Attribute**|**DataType**|**Description**|**Allowed Values** -:-----|:-----|:-----|:-----|:----- -`Name`|Key|String|The name of the Visual Studio Code extension to manage.|To find extensions in VSCode, check out: https://code.visualstudio.com/docs/editor/extension-marketplace#_find-and-install-an-extension -`Version`|Optional|String|The version of the Visual Studio Code extension to install. If not specified, the latest version will be installed.| For example: `1.0.0` -`Exist`|Optional|Boolean|Indicates whether the extension should exist. The default value is `$true`.|`$true`, `$false` -`Insiders`|Optional|Boolean|Indicates whether to manage the extension for the Insiders version of Visual Studio Code. The default value is `$false`.|`$true`, `$false` +| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** | +| ------------- | ------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `Name` | Key | String | The name of the Visual Studio Code extension to manage. | To find extensions in VSCode, check out: | +| `Version` | Optional | String | The version of the Visual Studio Code extension to install. If not specified, the latest version will be installed. | For example: `1.0.0` | +| `Exist` | Optional | Boolean | Indicates whether the extension should exist. The default value is `$true`. | `$true`, `$false` | +| `Insiders` | Optional | Boolean | Indicates whether to manage the extension for the Insiders version of Visual Studio Code. The default value is `$false`. | `$true`, `$false` | ## EXAMPLES diff --git a/resources/Help/PythonPip3Dsc/Pip3Package.md b/resources/Help/PythonPip3Dsc/Pip3Package.md index 6b6af440..10b567d9 100644 --- a/resources/Help/PythonPip3Dsc/Pip3Package.md +++ b/resources/Help/PythonPip3Dsc/Pip3Package.md @@ -19,13 +19,13 @@ The `Pip3Package` DSC Resource allows you to install, update, and uninstall Pyth ## PARAMETERS -**Parameter**|**Attribute**|**DataType**|**Description**|**Allowed Values** -:-----|:-----|:-----|:-----|:----- -`SID`|Key, Mandatory|String|The security identifier. This is a key property and should not be set manually.| -`Exist`|Optional|Boolean|Indicates whether the package should exist. Defaults to `$true`.| `$true` or `$false` -`Package`|Mandatory|String|The name of the Python package to manage. This is a mandatory property.| For a list of Python packages, see https://pypi.org/. -`Version`|Optional|String|The version of the Python package to manage. If not specified, the latest version will be used.| For example: `5.1.2` -`Arguments`|Optional|String|Additional arguments to pass to pip3.| Add arguments like `--debug` +| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** | +| ------------- | -------------- | ------------ | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------- | +| `SID` | Key, Mandatory | String | The security identifier. This is a key property and should not be set manually. | pack have been installed. | +| `Exist` | Optional | Boolean | Indicates whether the package should exist. Defaults to `$true`. | `$true` or `$false` | +| `Package` | Mandatory | String | The name of the Python package to manage. This is a mandatory property. | For a list of Python packages, see | +| `Version` | Optional | String | The version of the Python package to manage. If not specified, the latest version will be used. | For example: `5.1.2` | +| `Arguments` | Optional | String | Additional arguments to pass to pip3. | Add arguments like `--debug` | ## EXAMPLES From 6303e67df923b939fa81747b305a8b39a67ff3e2 Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Thu, 7 Nov 2024 05:21:04 +0100 Subject: [PATCH 6/9] Add linter to rules of software --- .github/actions/spelling/expect/software.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spelling/expect/software.txt b/.github/actions/spelling/expect/software.txt index 8ed24f0c..239fdd28 100644 --- a/.github/actions/spelling/expect/software.txt +++ b/.github/actions/spelling/expect/software.txt @@ -6,3 +6,4 @@ cspell NUnit reportgenerator Toolpackage +markdownlint From bc52cfb8951d51c428791ec28d88e37979f1b0ab Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Wed, 13 Nov 2024 04:36:01 +0100 Subject: [PATCH 7/9] Exclude main --- .github/workflows/markdownLint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/markdownLint.yaml b/.github/workflows/markdownLint.yaml index f9bf7b33..2862dfbc 100644 --- a/.github/workflows/markdownLint.yaml +++ b/.github/workflows/markdownLint.yaml @@ -4,6 +4,7 @@ on: push: branches: - '**' + - '!main' tags-ignore: - '**' pull_request_target: From 172cb1d1543f4248f537a3f50b000a18c00eaf08 Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Wed, 13 Nov 2024 04:37:15 +0100 Subject: [PATCH 8/9] Remove extension --- .vscode/extensions.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index e942e8aa..33d1ff21 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,6 @@ { "recommendations": [ "redhat.vscode-yaml", - "EditorConfig.EditorConfig", - "DavidAnson.vscode-markdownlint" + "EditorConfig.EditorConfig" ] } From 512f5774c7ed34e1e623baeb4b69572df96d1330 Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Wed, 13 Nov 2024 04:38:35 +0100 Subject: [PATCH 9/9] Add extension after merge --- .vscode/extensions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 24b6530a..2e40c1f6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "redhat.vscode-yaml", "EditorConfig.EditorConfig", - "ms-vscode.powershell" + "ms-vscode.powershell", + "davidanson.vscode-markdownlint" ] }