wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.

Home Page:http://www.wiremod.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing pattern checks

Vurv78 opened this issue · comments

commented

Pattern complexity checks are missing in certain parts of code

  1. Gates
  2. E2 find library

Haven't looked much into it

Could simply run WireLib.CheckRegex against every occurance, only I ran into a problem with E2 find library: the pattern is stored before it's used, and it's expected to be used against every entity's classname. Pausing the find operation in the middle would be bad UX, but you can't expect the longest entity's classname. Maybe just test it on definition against a dummy 32 character string? Could open up a branch to show you what I mean.

Yeah, running the check against a 32 length sounds fine for e2 find lib.