Skip to content

[Feature] - magic number linting #39

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

Open
8 tasks
totally-not-frito-lays opened this issue May 24, 2024 · 0 comments
Open
8 tasks

[Feature] - magic number linting #39

totally-not-frito-lays opened this issue May 24, 2024 · 0 comments
Assignees

Comments

@totally-not-frito-lays
Copy link
Member

totally-not-frito-lays commented May 24, 2024

Is your feature request related to a problem? Please describe.
While we don't have a strict style guide yet, we should try to encourage clean coding however we can. Linting 1 is one such tool we can use to do this. There are broadly two places where linting can take place:

  1. on GitHub through actions
  2. locally through an extension / cli linter

Describe the solution you'd like

Requirements (in this order)

  • Fill in the notion code style page with some suggestions for linting rules (send email to @totally-not-frito-lays whenever ready for next steps)
  • Propose a local styling linter to run locally + configuration for this
    • Linting rule should require no magic numbers2 for CPP
    • Linting rule should include caps for constants in the library
    • Linting rule should enforce variables in .ino files to be snake case
    • Linting rule should enforce functions to be camelCase
    • Linting rule should enforce classes to be PascalCase
  • Set up a GitHub actions 3 linter to run after merging

Describe alternatives you've considered
This is a nice to have to help make our system more robust and prevent bugs from hitting production / the classroom.

Additional context
This ticket is similar but separate from the #17 ticket.


Footnotes

  1. Linting

  2. Magic Numbers

  3. GitHub Actions Documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants