Closed DarqueWarrior closed 3 years ago
Is this change also making the module cross-platform ready or not? There was one dependency I cannot remember anymore that was making it not.
Is this change also making the module cross-platform ready or not? There was one dependency I cannot remember anymore that was making it not.
So far I have tested on all three platforms and everything is working.
not really approving but wanted to check what is changing for myself.
@DarqueWarrior, Regarding our conversation about the HelpUri I tried to create a script to maybe control it to add it via a build script automatically.
I created the following:
$cmdlet = [System.Management.Automation.Language.Parser]::ParseFile('.\Source\Public\Add-VSTeam.ps1', [ref]$null, [ref]$Null)
$cdmletBinding = $cmdlet.FindAll( {
param(
[System.Management.Automation.Language.Ast] $ast
)
$ast -is [System.Management.Automation.Language.AttributeAst] -and
$ast.TypeName.Name -eq "CmdletBinding"
}, $true)
$hasHelpUri = ($cdmletBinding[0].NamedArguments | Where-Object { $_.ArgumentName -eq "HelpUri" }).Count -gt 0
if(!$hasHelpUri){
}
This at least checks if the CmdletBinding attribute exists (e.g. [CmdletBinding(HelpUri="www.google.de")]
). We could use this with PSScriptAnalyzer and create a custom rule or just add a new script checking every file for that.
But I found it harder to properly add a HelpUri automatically. AST is made for checking code but not changing it. We would need to edit the file directly probably via string and Set-Content functions. At least I don't know another way.
@DarqueWarrior site is now pushed: https://methodsandpractices.github.io/vsteam-docs/
maybe you want to add this URL to the VSTeam repo metadata so users can directly access it from the repo homepage.
@DarqueWarrior site is now pushed: https://methodsandpractices.github.io/vsteam-docs/
maybe you want to add this URL to the VSTeam repo metadata so users can directly access it from the repo homepage.
The links still don't work. site = https://methodsandpractices.github.io/vsteam-docs/docs/modules/vsteam/commands/Add-VSTeam functions = https://methodsandpractices.github.io/vsteam-docs/docs/modules/vsteam/Add-VSTeam
There is a new commands part. I can change all the links. I just need to know which is going to be the final URLs.
PR Summary
This is a major architecture update. All the classes have been moved from PowerShell to a C# class library.
This changed the build because it has to build both a .NET Core class lib and the PowerShell parts.
I also added a few new functions to keep the Cache code consistent.
I also reviewed every function to make sure the code is consistent across the module.
PR Checklist