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

Refactor checks and messages to be centered around code #211

Open
Fuco1 opened this issue Mar 6, 2023 · 0 comments
Open

Refactor checks and messages to be centered around code #211

Fuco1 opened this issue Mar 6, 2023 · 0 comments

Comments

@Fuco1
Copy link
Member

Fuco1 commented Mar 6, 2023

All error messages should have a code. This way we can selectively ignore them with annotations or disable checks alltogether.

In general, there is a bigger refactoring necessary:

  1. Each check should be its own class, including the "internal"
    checks, not only the rules from "rulesets". They do not have to be
    registered as-such, but should follow the same framework.
  2. Each check should have richer metadata structure, similar to eslint:
  • code => short descriptive code in lisp-naming-style-with-dashes
  • level => notice, warning, error
  • description => Human readable description, i.e. docstring
  • messages => all the messages this check can produce. It's an
    alist from "code" to a format string. Format string should look
    like "The form ${form} can not accept type ${type}" (like
    s-lex-format). The placeholders will be extracted and supplied
    as plist values: pseudo code (make-message this form :id bla :form ... :name ...), where this is the check instance (maybe
    could be omited).
  • schema: configuration schema. We should provide way to configure
    rules similar to eslint... but this is next step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant