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

[WIP] add lint: Allocating properties of Mesh should not be get in loop #358

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KisaragiEffective
Copy link

Fixes #52

Checklist

  • I have read the Contribution Guide ;
  • There is an approved issue describing the change when contributing a new analyzer or suppressor ;
  • I have added tests that prove my fix is effective or that my feature works ;
  • I have added necessary documentation (if appropriate) ;

Short description of what this resolves:

I'll make this PR will:

  1. Address Avoid array copy when querying Length for mesh.vertices #52 (use mesh.vertexCount instead of mesh.vertices.Count)
  2. about Binding "Allocating-properties":
    1. Warn about
    2. Move it to outer scope that does not surrounded by loop construct

However this is incomplete, and will be convered in later commits.

Changes proposed in this pull request:

  • lint on getting "allocating-properties" in loop
    • loop-dependency is not considered at the first commit
  • suggest mesh.vertexCount over mesh.vertices.Count

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid array copy when querying Length for mesh.vertices
1 participant