You've already forked v8-code-style
mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2025-12-03 17:26:16 +02:00
713 B
713 B
Excessive named self reference in common module
Excessive usage of named self reference in common module (when referencing method, property or attribute). For cached modules self reference is allowed.
Noncompliant Code Example
Inside common module named "MyModule":
Var myParam;
Function test() Export
// code here
EndFunction
MyModule.myParam = MyModule.test();
Compliant Solution
Inside common module named "MyModule":
Var myParam;
Function test() Export
// code here
EndFunction
myParam = test();
Inside common module named "MyModuleCached":
Var myParam;
Function test() Export
// code here
EndFunction
myParam = MyModuleCached.test();