{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/372","labels_url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/372/comments","events_url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/372/events","html_url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/372","id":118755447,"number":372,"title":"Error handling and error messages","user":{"login":"juneb","id":2954883,"avatar_url":"https://avatars.githubusercontent.com/u/2954883?v=3","gravatar_id":"","url":"https://api.github.com/users/juneb","html_url":"https://github.com/juneb","followers_url":"https://api.github.com/users/juneb/followers","following_url":"https://api.github.com/users/juneb/following{/other_user}","gists_url":"https://api.github.com/users/juneb/gists{/gist_id}","starred_url":"https://api.github.com/users/juneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juneb/subscriptions","organizations_url":"https://api.github.com/users/juneb/orgs","repos_url":"https://api.github.com/users/juneb/repos","events_url":"https://api.github.com/users/juneb/events{/privacy}","received_events_url":"https://api.github.com/users/juneb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/labels/Discussion","name":"Discussion","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-25T03:54:03Z","updated_at":"2016-01-11T21:41:51Z","closed_at":"2016-01-11T21:41:51Z","body":"I've seen several cases like this one where we write a non-terminating error and then provide results. We need to review our error handling. Should this be a terminating error? Or, should it be an error that the end-user sees? How should the user fix this error?\r\n\r\nPS C:\\ps-test> Invoke-ScriptAnalyzer -ScriptDefinition \"function get-Widgets { Hello, World }\"\r\nInvoke-ScriptAnalyzer : Parse error in script definition:  Missing argument in parameter list at line 1 column 29.\r\nAt line:1 char:1\r\n+ Invoke-ScriptAnalyzer -ScriptDefinition \"function get-Widgets { Hello ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : ParserError: (MissingArgument:String) [Invoke-ScriptAnalyzer], ParseException\r\n    + FullyQualifiedErrorId : Parse error in script definition:  Missing argument in parameter list at line 1 column 29.,Micr\r\n   osoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCommand\r\n\r\n\r\nRuleName                            Severity     FileName   Line  Message\r\n--------                            --------     --------   ----  -------\r\nPSUseSingularNouns                  Warning                 1     The cmdlet 'get-Widgets' uses a plural noun. A singular\r\n                                                                  noun should be used instead."},"comment":{"url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/comments/170699652","html_url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/372#issuecomment-170699652","issue_url":"https://api.github.com/repos/PowerShell/PSScriptAnalyzer/issues/372","id":170699652,"user":{"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},"created_at":"2016-01-11T21:41:51Z","updated_at":"2016-01-11T21:41:51Z","body":"We have a consistent experience for error cases in v1.2.0 of ScriptAnalyzer. Please try it out and let us know if you have feedback."}}