arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

Detect library editing & enable warnings

Open PaulStoffregen opened this issue 7 years ago • 2 comments
trafficstars

Perhaps arduino-builder could detect when someone is editing a library's files, rather than just using an installed copy. This might be done by comparing timestamps on library source files to library.properties or other non-source files. Or maybe the presence of a .git folder is enough?

The idea would be to turn on all compiler warnings when building that library. Ordinary users would not be bothered, and library authors would not be bothered by warnings from other libraries, only their's.

Over time, this could lead to a significant improvement in the quality of library code over the entire Arduino ecosystem.

Previously mentioned here.

PaulStoffregen avatar Sep 13 '18 23:09 PaulStoffregen

Completely agree but I'm not sure how we should achieve this; presence of .git folder could be a good candidate but the best would be also tracking if the repo is "dirty". However, in this case the switch wouldn't trigger if you commit before testing :slightly_smiling_face:

facchinm avatar Sep 14 '18 08:09 facchinm

Proposal PRs

https://github.com/arduino/arduino-builder/pull/301

https://github.com/arduino/arduino-builder/pull/302

rsora avatar Oct 21 '21 13:10 rsora