arduino-libraries / Arduino_UnifiedStorage

Read and write files to flash, USB mass storage and SD cards in a unified way.
GNU Lesser General Public License v2.1
11 stars 3 forks source link

[Feature Request] Move "test" sketches into "examples" folder #15

Closed aentinger closed 10 months ago

aentinger commented 10 months ago

Normally we store only host-executed unit tests within the extra/tests sub-folder.

Moving those sketches over in the examples folders has the added benefit of finding them quickly via the IDE.

aliphys commented 10 months ago

Thanks for highlighting this @aentinger 🌷

The rational for having the tests in the extras/tests subfolder was mentioned as part of https://github.com/arduino/arduino-lint/issues/588 . Specifically:

Including test sketches, which have no/little pedagogical value, will increase the complexity of the user experience. Advanced users can always see the test sketches in the repository or local installation of the library.

sebromero commented 10 months ago

These tests are more like functional tests, so, yes maybe they should be in a different place. I agree though, that I don't want the end users to see them as they are not meant to be executed by them. We have separate sketches to demonstrate the features of this library. What if we create a new folder functional-tests? Would that make it clearer?

aliphys commented 10 months ago

@sebromero If we create a new folder called functional-tests, it would need to be inside the extras folder: extras/functional-tests.

Rule LD003 of the linter does not allow for any .ino sketches to be outside the examples or extras (sub)folders.

A sketch was found outside the library's examples and/or extras subfolders. Example sketches must be placed in the standardized location.

https://github.com/arduino/arduino-lint/blob/9e5ae478fffcb39f42d8dce7911912891e12b5ad/internal/rule/ruleconfiguration/ruleconfiguration.go#L1303-L1319

sebromero commented 10 months ago

@aliphys Sure that's what I meant.