Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow test sketches to be outside examples folder #588

Closed
3 tasks done
aliphys opened this issue Aug 31, 2023 · 1 comment
Closed
3 tasks done

Allow test sketches to be outside examples folder #588

aliphys opened this issue Aug 31, 2023 · 1 comment
Assignees
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@aliphys
Copy link
Contributor

aliphys commented Aug 31, 2023

Describe the request

The linter should allow for sketches outside of the examples folder to be within spec. Main reason, is to keep two types of .ino files seperate based on their functionality

  • Example sketches -> These showcase the functionality of the library and have practical and/or pedagogical value
  • Test sketches -> These are meant to strain the compile-sketches.yml workflow to the limit, as part of continuous testing (CT) procedures.

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.

Describe the current behavior

According to Rule LD003, the linter does not allow for sketches outside the examples folder in the root directory of the library.

ID: "LD003",
Brief: "stray sketch",
Description: "A sketch was found outside the library's `examples` and/or `extras` subfolders. Example sketches must be placed in the standardized location.",
MessageTemplate: "Sketch(es) found outside examples and extras folders:\n{{.}}",

Arduino Lint version

arduino/arduino-lint-action@v1

Operating system

N/A

Operating system version

runs-on: ubuntu-latest

Additional context

Running Linter via check-arduino.yml workflow kindly provided by @per1234

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details
@aliphys aliphys added the type: enhancement Proposed improvement label Aug 31, 2023
@per1234 per1234 self-assigned this Aug 31, 2023
@per1234
Copy link
Contributor

per1234 commented Aug 31, 2023

Thanks for your suggestion, but the current configuration of the rule is as intended. If you want to add test sketches to the library, please put them under the extras folder as suggested by the rule message.

There is a proposal for adding a dedicated folder for test files to the Arduino Library Specification:

arduino/arduino-cli#990

However, the rule would only be adjusted if that proposal was accepted.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
@per1234 per1234 added conclusion: declined Will not be worked on topic: code Related to content of the project itself labels Aug 31, 2023
@per1234 per1234 changed the title [AE-158] Allow test sketches to be outside examples folder Allow test sketches to be outside examples folder Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants