Skip to content

Comment based help should be loose validating #1021

Closed

Description

function Get-CronJob {
<#
.SYNOPSIS
  Returns the current cron jobs from the cron table
.DESCRIPTION
  Returns the current cron jobs from the cron table
.EXAMPLE
  Get-CronJob -UserName Steve
.RETURNVALUE
  CronJob objects
.PARAMETER UserName
  Optional parameter to specify a specific user's cron table
#>

[CmdletBinding()]
[OutputType([PSObject])]
param (
    [Alias("u")][Parameter(Mandatory=$false)][String] $UserName
)
process {
    $crontab = Get-CronTab -user $UserName
    ForEach ($line in $crontab) {
        if ($line.Trim().Length -gt 0)
        {
            ConvertTo-CronJob -crontab $line
        }
    }
}

}

Get-CronJob -?

Expected behavior

help text

Actual behavior

syntax only

Environment data

v0.4.0

Activity

  1. added this to the milestone on May 22, 2016
  2. added
    Issue-Bug
    on May 23, 2016
  3. andyleejordan commented on May 23, 2016

    @andyleejordan
    Member

    sergei (@vors) Can you point me toward the help system that would do this?

  4. added
    WG-Interactive-HelpSystem
    on Aug 3, 2016
  5. modified the milestones: , post-6.0.0 on Oct 17, 2016
  6. added this to the milestone on May 22, 2017
  7. 7 remaining items

  8. changed the title [-]Comment based help not working[/-] [+]Comment based help should be loose validating[/+] on Jun 13, 2017
  9. added
    Issue-Enhancement
    and removed
    Issue-Bug
    on Jun 13, 2017
  10. SteveL-MSFT commented on Jun 13, 2017

    @SteveL-MSFT
    MemberAuthor

    In general, I think we should be loose validating so that future supported extensions don't break existing scripts. Strict validation should be handled by PSScriptAnalyzer. In this case, I would agree this isn't needed for 6.0.0 as it's working as previously designed.

  11. kilasuit commented on Feb 15, 2022

    @kilasuit
    Collaborator

    This would be a nice to have but I can't see how much value this would really add as the CBH syntax is already quite presctriptive and I'm not sure that this really will add much more value for the effort to enable it

  12. doctordns commented on Feb 15, 2022

    @doctordns
    Collaborator

    I would like some better error reporting when the CBH is broken. I'd like to see get-help to actually report the errors vs silently failing.

  13. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  14. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  15. added
    Resolution-No Activity
    on Nov 16, 2023
  16. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  17. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-EnhancementResolution-No ActivityWG-Interactive-HelpSystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions