Show warning when editing board file in the SDK

nRF Connect for VS Code

tags
nRF Connect for VS Code

When working with devicetree files, it is easy to accidentally make a change in a source file that belongs to the nRF Connect SDK when you really meant to make the change in a file that belongs to your application.

One common example of such a pitfall is when you forget to define an overlay file and start working directly on the board file of a development kit. If you maintain your own board files, this is still a valid usage scenario, but if you do not, you might end up breaking other applications.

To help avoid this, the extension now warns your if you are about to edit a board file under the nrf or zephyr directories in the SDK. Hovering over the warning shows a tooltip from which you can create a new overlay file. The button works the same way as the corresponding option in the Details View.

Warning tooltip when editing an SDK file