Completed
Push — master ( dce25d...9db7be )
by Dimas
09:29 queued 12s
created

etc/server/websocket/client.js   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 9
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 9
c 0
b 0
f 0
rs 10
wmc 1
mnd 1
bc 1
fnc 0
bpm 0
cpm 0
noi 3
1
var source;
2
3
if (!!window.EventSource) {
4
  var source = new EventSource('/server/websocket/run');
0 ignored issues
show
Comprehensibility Naming Best Practice introduced by
The variable source already seems to be declared on line 1. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
5
} else {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
6
  // Result to xhr polling :(
7
}
8
9
console.log(source);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...