Skip to content

Cleanup: Move the lint initialization to be the start of a file #371

@sleevi

Description

@sleevi

This came up in #369 , and then expanded upon in #370 .

The current style of lints is that they follow a form of

  • citation of relevant spec (usually)
  • Lint.Initialize
  • Lint.CheckApplies
  • Lint.Execute
  • init()

The citation of the relevant spec text is related to the Citation and Source within the new Lint, but that's not immediately clear, especially for Lints that have sizable quotations or implementations.

One suggestion from #370 was to consider moving the init() function to the start of the file, so that opening a file, it's possible to read what's being checked, where the requirement comes from, and only after that, how that particular check is implemented.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions