Showing 49 of 114 total issues
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const renderer = this.props.renderer;
if (!renderer) {
return null;
}
Function constructor
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(props) {
super();
this.element = document.body;
this.unit = props.for;
Function createDef
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
createDef(data, batchData) {
const def = this.stubDef();
const { textures } = data;
const { vertexColorAnimations, transparencyAnimations, uvAnimations } = data;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleLogonChallenge
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleLogonChallenge(ap) {
ap.readUnsignedByte();
const status = ap.readUnsignedByte();
switch (status) {
Function authenticate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
authenticate(account, password) {
if (!this.connected) {
return false;
}
Function mapStats
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
mapStats() {
const map = this.props.map;
return (
<div>
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function loadTexture
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadTexture(textureDef) {
const wrapS = THREE.RepeatWrapping;
const wrapT = THREE.RepeatWrapping;
const flipY = false;
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<auth className="auth screen">
<div className="panel">
<h1>Authentication</h1>
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(manager, entry) {
this.manager = manager;
this.entry = entry;
this.root = null;
Function unload
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
unload() {
this.unloading = true;
this.manager.entries.delete(this.entry.id);
this.manager.counters.loadedEntries--;
Function handleAuthChallenge
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleAuthChallenge(gp) {
console.info('handling auth challenge');
gp.readUnsignedInt(); // (0x01)
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<characters className="characters screen">
<div className="panel">
<h1>Character Selection</h1>
Function createUVAnimations
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
createUVAnimations(uvAnimationDefs) {
if (uvAnimationDefs.length === 0) {
return;
}
Function connect
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
connect(host, port = NaN) {
if (!this.connected) {
this.host = host;
this.port = port;
this.uri = 'ws://' + this.host + ':' + this.port;
Function animate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
animate(delta, camera, cameraMoved) {
for (const wmoDoodad of this.animatedDoodads.values()) {
if (!wmoDoodad.visible) {
continue;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function dataReceived
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
dataReceived(_socket) {
while (true) {
if (!this.connected) {
return;
}
Function registerAnimationTrack
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerAnimationTrack(opts) {
const trackName = opts.target.uuid + '.' + opts.property;
const animationBlock = opts.animationBlock;
const { valueTransform } = opts;
Function dbc
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
dbc(req, res) {
const name = req.resourcePath.match(/(\w+)\.dbc/)[1];
const definition = DBC[name];
if (definition) {
const dbc = definition.dbc.decode(new DecodeStream(req.resource.data));
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function loadTexture
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
loadTexture(textureDef) {
const wrapS = THREE.RepeatWrapping;
const wrapT = THREE.RepeatWrapping;
const flipY = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function constructor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
constructor(path, data, skinData, instance = null) {
super();
this.matrixAutoUpdate = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"