The ARM Template Toolkit is an excellent project for testing your ARM templates against best practice. Some time ago, I created an Azure DevOps extension for running the ARM TTK as part of an Azure DevOps pipeline so you can test your templates before you deploy them. You can find the extension here.
I’m pleased to announce that the extension now also supports the testing of Bicep files, the new intermediate languge from Microsoft for creating infrastructure. The extension supports Bicep files directly, no need for you to compile to ARM first. All you need to do to use this is ensure you have upgraded to version 1.1.61 and point it at a folder containing Bicep files.
Behind the scenes, the extension is compiling the templates to ARM for you, as the TTK doesn’t directly support Bicep. This does mean you need Bicep CLI installed on your build agent. If your build agent has access to download from the internet, then it will install the Bicep CLI for you; there is nothing for you to do. However, if you lock down what your agent can access, you may want to manually install the Bicep CLI on your agent before running the tests.
For more details on how to use the extension and get test results, look at this article. Finally, if you are interested in looking at the code and maybe contributing, you can find the project on GitHub here.