Azure / Azure/bicep

We should have a code fix for BCP045 (can't use "+" with strings)

Open
#7,002 2 comments 0 reactions 0 assignees View on GitHub
devdiv story: linter rules
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 2h
Merged PRs (30d)
79

Description

```bicep
var s1 = 'hello'
var s2 = 'there'
output o string = s1 + s2
```
```
Cannot apply operator "+" to operands of type "'hello'" and "'there'". Use string interpolation instead.bicep(BCP045)
```

Contributor guide

Open the contributing guide

Research direction

Start with the BCP045 diagnostic shown in the issue and reproduce the example using the two string variables and the + operator. Trace where this diagnostic is produced and where code fixes are registered; done means the example offers a fix that replaces concatenation with string interpolation.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
compilers, devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.