Azure / Azure/azure-functions-powershell-library
[bug bash] Update parsing error formatting to include single quotes for the function name and attribute that is incorrect
- Dominant language
- C#
- Stars
- 2
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
When defining a function and the parameter contains two binding name attributes, the error message should include single quotes for the function name and attribute name
```powershell
function AnotherFunction
{
[Function()]
param (
[HttpTrigger(Authorization = 'anonymous', Method = ('Get', 'Post'), Route = '')]
[HttpTrigger(Authorization = 'anonymous')]
#[HttpTrigger()]
$Request
)
[HttpResponseContext]@{
StatusCode = [HttpStatusCode]::OK
Body = "Hello form AnotherFunction!"
} | Push-OutputBinding -Name Response
}
```
```
Current error message: Get-FunctionsMetadata: Multiple bindings with name Request in function AnotherFunction
Expected error message: Get-FunctionsMetadata: Multiple bindings with name 'Request' in function 'AnotherFunction'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Search the repository for the current error text, then reproduce the duplicate-binding case using the PowerShell example in the issue. Update the formatting so both the binding attribute and function name appear in single quotes, and verify the resulting message matches the expected wording.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, powershell
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100