From the course: Azure Infrastructure as Code with GitHub
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Test with Bicep linter
From the course: Azure Infrastructure as Code with GitHub
Test with Bicep linter
- Let's look at another way of testing our Bicep template. We are now going to look at the quality of the code, so not so much as what it deploys, but if the code is clean and if it's understandable for someone else who might use it. We are going to use Linter. And you might already be familiar with Linter if you are using the bicep extension in Visual Studio Code. It is what gives these yellow squiggly lines along in your code where you can see that you have not followed best practice. I've taken the template that we used before, and in line nine, you can see I have changed the location to resource group dot location instead of using parameter. This is against Bicep best practices. This template will work without issues but the syntax of the code isn't the best practice. And we can see that if we mouse over the squiggly line, and again, we can see it in line three, which is a little bit of an easier error message, as it's…