While we can all agree that code cops are essential for helping us to create a cleaner and better code, we also want some cops to step aside and let us develop our apps without constantly distracting with the hundreds of warnings that a single project can have.
In this quick post I will show how to setup a file with the warnings you don´t want to be displayed in the problem section of Visual Studio Code.
With every warning comes an identifier with it. For intance: AL(AA0005). In the following link you can see all the Analyzer rules that Microsoft have published:
We have identified the problem, now we just need to tell VS Code what to do.
The Json File
In the settings.json (F1 + Open Settings JSON) file we can use a statement called “al.ruleSetPath” that does precisely this. “Sets the path to the file containing the customized rules to use when running code analysis.”
Finally, we need to create that file and link it in our settings. It is a json file and it is as simple as this:
With knowledge comes responsibility so it´s up to you wich ones your are willing to block and wich ones you keep in order to have a clean code and a better understanding of it.
Hope you find it useful