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

Implement the lint_too_many_instance_attributes Warning #514

Merged
merged 5 commits into from
May 28, 2024

Conversation

GreasySlug
Copy link
Member

@GreasySlug GreasySlug commented May 26, 2024

Fixes #500

Changes proposed in this PR:

  • add lint command (cargo rd -- --lint)
    If it is not intentionally provided as a command, I'll delete it.
  • warning if instance attribute is 36 or higher

too_many_instance_attributes

Is it possible to take the location of an instance attribute?

If possible, I would like to

  • idea
36 |     foo_36 = Int;
   :     ------------
   :     `- take advantage of subclasses and data classes

AttributeWarning: too many instance attributes

@mtshiba

@mtshiba mtshiba self-requested a review May 28, 2024 05:14
@mtshiba mtshiba added the lint label May 28, 2024
@GreasySlug GreasySlug merged commit fc52a1c into erg-lang:main May 28, 2024
21 checks passed
@GreasySlug GreasySlug deleted the linter branch September 21, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linter: add "too many instance attributes" warning
2 participants