Skip to content

Linting #573

@eliassjogreen

Description

@eliassjogreen

As the Nova project grows it is important that we maintain convention and especially conform to certain rules when it comes to the GC (as described in the CONTRIBUTING document). To ease this I suggest we implement some project specific lints using dylint just for nova and projects embedding nova.

Rules

These are some rules I suggest we implement off the top of my head:

  • Warn when a function could take a NoGcScope instead of a GcScope
  • Make sure Agent is the first argument of fn definitions
  • Make sure GcScope/NoGcScope is the last argument of fn definitions
  • Make sure GcScope/NoGcScope are only passed by value
  • Check formatting of spec doc comments
  • No unbinding of values into local variables
  • No duplicate scoping of values
  • Calling reborrow only at the call site

Metadata

Metadata

Assignees

No one assigned

    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