You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65-38
Original file line number
Diff line number
Diff line change
@@ -1,44 +1,46 @@
1
-
# Docs Validation
1
+
# Learn Validation
2
2
3
-
This extension enables you to run build validation on a Docs conceptual or Learn repo at author time in VS Code. This means you can make sure your repo is free of validation issues before making a pull request.
3
+
This extension enables you to run build validation on a Learn conceptual or reference repository at author time in VS Code. This means you can make sure your repo is free of validation issues before making a pull request.
4
4
5
-
[!IMPORTANT]
6
-
> The source codes of the repo have been moved into Azure DevOps to follow security and compliance requirements. We will revisit the open source strategy in the future and may open the repo as open source again. Stay tuned!
7
-
> You are still welcomed to submit your issues or feature requests via [Issues](#issue).
5
+
## Prerequisites
8
6
9
-
## How to use the Docs Validation extension
7
+
- Install [git](https://git-scm.com/downloads).
8
+
- Clone your Learn repo locally in VS Code.
9
+
- All files in the repo must be saved when you are using the manually triggered validation.
10
+
11
+
## How to use the Learn Validation extension
10
12
11
13
### Manually triggered validation
12
14
13
-
1. Open the root folder or any sub-folder of a Docs conceptual or Learn repo in VS Code with the extension installed.
15
+
1. Open the root folder or any sub-folder of a Learn repository in VS Code with the extension installed.
14
16
1. For the first time you use the extension, you will be asked to choose your user type between **Microsoft employee** and **Public contributor** before you can use full-repository validation.
15
-
1. For **Microsoft employee**, you are required to sign in before using full-repository validation. You can click **Docs Validation** on the status bar then click **Sign in** from the drop-down menu to sign in.
17
+
1. For **Microsoft employee**, you are required to sign in before using full-repository validation. You can click **Learn Validation** on the status bar then click **Sign in** from the drop-down menu to sign in.
16
18
1. There are three ways to trigger the manual validation:
17
19
1. After signing in, you can trigger a validation by clicking **Validate** when prompted. This will trigger the validation on the current opening workspace, so the files outside the current workspace will not be validated if you are on the sub-folder of a repository.
18
-
2. You can click **Docs Validation** on the status bar then click **Validate the current workspace** from the drop-down menu to trigger the validation on the current workspace.
20
+
2. You can click **Learn Validation** on the status bar then click **Validate the current workspace** from the drop-down menu to trigger the validation on the current workspace.
19
21
3. You can right-click any file/folder inside the **Explorer** and select **Validate this folder**, if you click on the file, the validation will be applied to the folder contains the selected file, otherwise, the validation will be applied to the selected folder.
20
22
1. Build validation will run locally and all results will be output to the Problems pane.
> **Note:** The first time you validate a repo, all the Docs build dependencies will be fetched and cached locally. Subsequent validation runs will be faster.
26
+
> **Note:** The first time you validate a repo, all the Learn build dependencies will be fetched and cached locally. Subsequent validation runs will be faster.
25
27
26
28
### Real-time validation
27
29
28
-
1. Open the root folder or any sub-folder of a Docs conceptual or Learn repo in VS Code with the extension installed.
30
+
1. Open the root folder or any sub-folder of a or Learn repository in VS Code with the extension installed.
29
31
2. For the first time you use the extension, you will be asked to choose your user type between **Microsoft employee** and **Public contributor** before you can use real-time validation.
30
-
3. The real-time validation is enabled by default, you can disable it in the extension settings (Go to Settings -> Docs Validation -> Uncheck **Real-time Validation: Automatically Enable**). You will be asked to reload the extension after you disable real-time validation.
32
+
3. The real-time validation is enabled by default, you can disable it in the extension settings (Go to Settings -> Learn Validation -> Uncheck **Real-time Validation: Automatically Enable**). You will be asked to reload the extension after you disable real-time validation.
4. For **Microsoft employee**, the extension will check your sign-in status before real-time validation starts to work. If you haven't signed in or your credential expired, you will be asked to sign in. After sign-in succeeds, real-time validation will start automatically.
35
37
5. With real-time validation enabled, you will see validation issues (if any) while you are working on the repository (eg. modifying files, creating files and deleting files etc.).
### Inconsistent results between Docs Build validation and full-repository validation.
43
+
### Inconsistent results between Learn Build validation and full-repository validation.
42
44
43
45
- bookmark-not-found: The rendering information required to validate bookmarks in schema-based content isn't available publicly, so if you aren't signed in as a Microsoft employee you might not get all broken bookmark results.
44
46
- author-not-found and ms-author-invalid: These validations require external API calls that aren't supported locally at this time, so no results will be returned for them.
@@ -52,13 +54,13 @@ Inconsistent results caused by the currently edited file needs validation result
52
54
- publish-url-conflict
53
55
- output-path-conflict
54
56
- Content or Metadata uniqueness
55
-
- duplicate-uid
56
-
- xref-property-conflict
57
-
- moniker-overlapping
58
-
- duplicate-title
59
-
- altText-duplicate
60
-
- duplicate-h1
61
-
- ...
57
+
- duplicate-uid
58
+
- xref-property-conflict
59
+
- moniker-overlapping
60
+
- duplicate-title
61
+
- altText-duplicate
62
+
- duplicate-h1
63
+
- ...
62
64
- bookmark-not-found
63
65
- Validation on hierarchy (for example `unit-no-module-parent`)
64
66
@@ -71,6 +73,7 @@ Inconsistent results caused by the currently edited file affects other files' va
71
73
- file-not-found
72
74
73
75
Other situations:
76
+
74
77
- Pull-request-only suggestions will be ignored by full-repository validation but will be reported by real-time validation.
75
78
- Include files will not be validated before you open any file includes them.
76
79
- .openpublishing.redirection.json will not be validated before you open any content file (.md or .yml).
@@ -87,7 +90,7 @@ When your validation fails with some error message like:
87
90
88
91
```bash
89
92
fatal: unable to access 'https://github.com/Microsoft/templates.docs.msft/': The requested URL returned error: 403
90
-
git-clone-failed Failure to clone the repository `https://github.com/Microsoft/templates.docs.msft#master`. This could be caused by an incorrect repository URL, please verify the URL on the Docs Portal (https://ops.microsoft.com). This could also be caused by not having the proper permission the repository, please confirm that the GitHub group/team that triggered the build has access to the repository.
93
+
git-clone-failed Failure to clone the repository `https://github.com/Microsoft/templates.docs.msft#master`. This could be caused by an incorrect repository URL, please verify the URL on the Microsoft Learn Portal (https://ops.microsoft.com). This could also be caused by not having the proper permission the repository, please confirm that the GitHub group/team that triggered the build has access to the repository.
91
94
Restore donein 11.77s
92
95
93
96
1 Error(s), 0 Warning(s), 0 Suggestion(s)
@@ -114,13 +117,15 @@ Please try the following solutions:
114
117
```
115
118
116
119
1. GitHub has recently enabled SSO on Microsoft-owned organizations. If you see the below errors, please follow the instructions there to enable SSO on your token so that local validation can pass through.
120
+
117
121
```bash
118
122
fatal: unable to access 'https://github.com/Microsoft/templates.docs.msft/': The requested URL returned error: 403
119
123
remote: The `microsoft' organization has enabled or enforced SAML SSO. To access
120
124
remote: this repository, visit https://github.com/enterprises/microsoftopensource/sso?authorization_request=AEJANEWOPPW6YTNW5TYNW2K7OBDR3A5PN5ZGOYLONF5GC5DJN5XF62LEZYAF32PCVVRXEZLEMVXHI2LBNRPWSZGODVDHWBVPMNZGKZDFNZ2GSYLML52HS4DFVNHWC5LUNBAWGY3FONZQ
121
125
```
122
126
123
127
1. If you see the below errors while cloning the template repository, this is caused by that you used the `Git Credential Manager Core` before GitHub enabled the SSO, and you need to re-authorize the application.
| Pipeline | Description | Trigger condition | Status |
185
+
|--|--|--|--|
186
+
|**vscode-docs-build-CodeCheck**| SDL related code check built on OneBranch | PR created to main branch <br />`or` Code Merged into main branch | [](https://ceapex.visualstudio.com/Engineering/_build/latest?definitionId=4230&repoName=vscode-docs-build&branchName=main) |
187
+
|**vscode-docs-build-CodeTest**| Run Test and collect the test coverage on two platforms: Windows and MacOS | PR created to main branch <br />`or` Code Merged into main branch | [](https://ceapex.visualstudio.com/Engineering/_build/latest?definitionId=4350&branchName=main) |
188
+
|**vscode-docs-build-LGTM**| LGTM related check | Code Merged into main branch | [](https://ceapex.visualstudio.com/Engineering/_build/latest?definitionId=4327&branchName=main) |
Please reference the document [Secrets managements](https://microsoft.sharepoint.com/teams/docsmicrosoftcom/_layouts/OneNote.aspx?id=%2Fteams%2Fdocsmicrosoftcom%2FShared%20Documents%2FOPS%20Build%2FOPS%20Build%20Channel%20OneNote&wd=target%28Docs%20Validation%20VSCode%20Extension.one%7C885B4924-63D4-4A36-9FF8-045844298BA0%2FSecrets%20managements%7C6BE16B1A-058E-486C-8563-6D340DEF0187%2F%29) for the detail
0 commit comments