GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 3eec9f...47bd99 )
by Alex
01:51
created

d3.json   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 1
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 1
loc 1
rs 10
nc 1
nop 1
1
function buildCharts(){sugarloaf.ndx=crossfilter(sugarloaf.data.trails),sugarloaf.openDim=sugarloaf.ndx.dimension(function(r){return r.open?"Open":"Closed"}),sugarloaf.openGroup=sugarloaf.openDim.group().reduceCount(function(r){return r.open}),sugarloaf.openChart=dc.rowChart("#chart-row-open"),sugarloaf.openChart.width(WIDTH).height(HEIGHT/2).margins(MARGINS).dimension(sugarloaf.openDim).group(sugarloaf.openGroup).elasticX(!0),sugarloaf.groomedDim=sugarloaf.ndx.dimension(function(r){return r.groomed?"Groomed":"Ungroomed"}),sugarloaf.groomedGroup=sugarloaf.groomedDim.group().reduceCount(function(r){return r.groomed}),sugarloaf.groomedChart=dc.rowChart("#chart-row-groomed"),sugarloaf.groomedChart.width(WIDTH).height(HEIGHT/2).margins(MARGINS).dimension(sugarloaf.groomedDim).group(sugarloaf.groomedGroup).elasticX(!0),sugarloaf.snowmakingDim=sugarloaf.ndx.dimension(function(r){return r.snowmaking?"Snowmaking in progress":"Not snowmaking"}),sugarloaf.snowmakingGroup=sugarloaf.snowmakingDim.group().reduceCount(function(r){return r.snowmaking}),sugarloaf.snowmakingChart=dc.rowChart("#chart-row-snowmaking"),sugarloaf.snowmakingChart.width(WIDTH).height(HEIGHT/2).margins(MARGINS).dimension(sugarloaf.snowmakingDim).group(sugarloaf.snowmakingGroup).elasticX(!0),sugarloaf.difficultyDim=sugarloaf.ndx.dimension(function(r){return r.difficulty}),sugarloaf.difficultyGroup=sugarloaf.difficultyDim.group().reduceCount(function(r){return r.difficulty}),sugarloaf.difficultyChart=dc.rowChart("#chart-row-difficulty"),sugarloaf.difficultyChart.width(WIDTH).height(HEIGHT).margins(MARGINS).dimension(sugarloaf.difficultyDim).group(sugarloaf.difficultyGroup).ordering(function(r){return sugarloaf.difficulty_order[r.key]}).elasticX(!0),sugarloaf.areaDim=sugarloaf.ndx.dimension(function(r){return r.area}),sugarloaf.areaGroup=sugarloaf.areaDim.group().reduceCount(function(r){return r.area}),sugarloaf.areaChart=dc.rowChart("#chart-row-area"),sugarloaf.areaChart.width(WIDTH).height(2*HEIGHT).margins(MARGINS).dimension(sugarloaf.areaDim).group(sugarloaf.areaGroup).elasticX(!0),dc.renderAll()}var filename_status="/api/current",WIDTH=300,HEIGHT=200,MARGINS={top:10,left:20,right:20,bottom:20},sugarloaf={};sugarloaf.difficulty_order={beginner:1,intermediate:2,black:3,"double-black":4,"terrain-park":5},d3.json(filename_status,function(r){sugarloaf.data=r,buildCharts()});
1 ignored issue
show
Bug introduced by
The variable d3 seems to be never declared. If this is a global, consider adding a /** global: d3 */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Bug introduced by
The variable dc seems to be never declared. If this is a global, consider adding a /** global: dc */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...