Sync eng/common directory with azure-sdk-tools for PR 1135 (#848)
* Add check of http link. * Fixed the tool http link Co-authored-by: Sima Zhu <sizhu@microsoft.com>
This commit is contained in:
parent
a09ceeaa01
commit
07c7293276
@ -449,7 +449,7 @@ Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
|
||||
@ -263,7 +263,7 @@ Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
|
||||
@ -200,6 +200,10 @@ function CheckLink ([System.Uri]$linkUri)
|
||||
}
|
||||
|
||||
if ($checkLinkGuidance) {
|
||||
if ($linkUri.Scheme -eq 'http') {
|
||||
LogWarning "DO NOT use 'http' in $linkUri. Please use secure link with https instead. Check here for more information: https://aka.ms/azsdk/guideline/links"
|
||||
$linkValid = $false
|
||||
}
|
||||
$link = $linkUri.ToString()
|
||||
# Check if the url is relative links, suppress the archor link validation.
|
||||
if (!$linkUri.IsAbsoluteUri -and !$link.StartsWith("#")) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user