Skip to content

[Feature] - magic number linting #39

@not-fritos

Description

@not-fritos

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions