{"action":"closed","issue":{"url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/422","labels_url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/422/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/422/comments","events_url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/422/events","html_url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/422","id":125203647,"number":422,"title":"PSShouldProcess requires boolean value","user":{"login":"iainbrighton","id":7023258,"avatar_url":"https://avatars.githubusercontent.com/u/7023258?v=3","gravatar_id":"","url":"https://api.github.com/users/iainbrighton","html_url":"https://github.com/iainbrighton","followers_url":"https://api.github.com/users/iainbrighton/followers","following_url":"https://api.github.com/users/iainbrighton/following{/other_user}","gists_url":"https://api.github.com/users/iainbrighton/gists{/gist_id}","starred_url":"https://api.github.com/users/iainbrighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iainbrighton/subscriptions","organizations_url":"https://api.github.com/users/iainbrighton/orgs","repos_url":"https://api.github.com/users/iainbrighton/repos","events_url":"https://api.github.com/users/iainbrighton/events{/privacy}","received_events_url":"https://api.github.com/users/iainbrighton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"quoctruong","id":4371645,"avatar_url":"https://avatars.githubusercontent.com/u/4371645?v=3","gravatar_id":"","url":"https://api.github.com/users/quoctruong","html_url":"https://github.com/quoctruong","followers_url":"https://api.github.com/users/quoctruong/followers","following_url":"https://api.github.com/users/quoctruong/following{/other_user}","gists_url":"https://api.github.com/users/quoctruong/gists{/gist_id}","starred_url":"https://api.github.com/users/quoctruong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quoctruong/subscriptions","organizations_url":"https://api.github.com/users/quoctruong/orgs","repos_url":"https://api.github.com/users/quoctruong/repos","events_url":"https://api.github.com/users/quoctruong/events{/privacy}","received_events_url":"https://api.github.com/users/quoctruong/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/milestones/8","html_url":"https://github.com/PowerShell/PSScriptAnalyzer/milestones/1602","labels_url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/milestones/8/labels","id":1486158,"number":8,"title":"1602","description":null,"creator":{"login":"raghushantha","id":11727200,"avatar_url":"https://avatars.githubusercontent.com/u/11727200?v=3","gravatar_id":"","url":"https://api.github.com/users/raghushantha","html_url":"https://github.com/raghushantha","followers_url":"https://api.github.com/users/raghushantha/followers","following_url":"https://api.github.com/users/raghushantha/following{/other_user}","gists_url":"https://api.github.com/users/raghushantha/gists{/gist_id}","starred_url":"https://api.github.com/users/raghushantha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raghushantha/subscriptions","organizations_url":"https://api.github.com/users/raghushantha/orgs","repos_url":"https://api.github.com/users/raghushantha/repos","events_url":"https://api.github.com/users/raghushantha/events{/privacy}","received_events_url":"https://api.github.com/users/raghushantha/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":2,"state":"open","created_at":"2016-01-05T23:40:51Z","updated_at":"2016-01-07T00:02:00Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-01-06T15:54:13Z","updated_at":"2016-01-07T00:02:00Z","closed_at":"2016-01-07T00:02:00Z","body":"The `PSShouldProcess` rule in v1.2.0 is triggering with the following definition\r\n```powershell\r\nfunction MyFunction {\r\n    [CmdletBinding(SupportsShouldProcess)]    \r\n    param ()\r\n    if ($PSCmdlet.ShouldProcess('Test')) {\r\n        \r\n    }\r\n}\r\n\r\nRuleName         Severity     FileName   Line  Message\r\n--------         --------     --------   ----  -------\r\nPSShouldProcess  Warning      ShouldProc 1   'MyFunction' calls ShouldProcess/ShouldContinue but\r\n                              ess.ps1        does not have the ShouldProcess attribute.\r\n```\r\nIf I specify a boolean value, the warning goes away.\r\n```powershell\r\nunction MyFunction {\r\n    [CmdletBinding(SupportsShouldProcess = $true)]    \r\n    param ()\r\n    if ($PSCmdlet.ShouldProcess('Test')) {\r\n        \r\n    }\r\n}\r\n```\r\nIMHO this is wrong as the `$true` value is not required?"}}