Skip to content

Commit

Permalink
chore: Fix fixedsize attribute in code path analysis DOT debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed May 20, 2023
1 parent 7a2a0be commit af705bf
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/linter/code-path-analysis/debug-helpers.js
Expand Up @@ -109,7 +109,7 @@ module.exports = {
text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
}
if (codePath.thrownSegments.length > 0) {
text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize];\n";
text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize=true];\n";
}

const traceMap = Object.create(null);
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/code-path-analysis/if-4.js
Expand Up @@ -16,7 +16,7 @@ digraph {
node[shape=box,style="rounded,filled",fillcolor=white];
initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];
s1_1[label="Program\nIfStatement\nIdentifier (a)"];
s1_2[label="BlockStatement\nReturnStatement\nLiteral (0)"];
s1_3[label="BlockStatement:exit"];
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/code-path-analysis/try--try-catch-2.js
Expand Up @@ -16,7 +16,7 @@ digraph {
node[shape=box,style="rounded,filled",fillcolor=white];
initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];
s1_1[label="Program\nTryStatement\nBlockStatement\nExpressionStatement\nCallExpression\nIdentifier (foo)"];
s1_2[label="CallExpression:exit\nExpressionStatement:exit\nBlockStatement:exit"];
s1_3[label="CatchClause\nIdentifier (err)\nBlockStatement\nThrowStatement\nIdentifier (err)"];
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/code-path-analysis/try--try-catch-4.js
Expand Up @@ -29,7 +29,7 @@ digraph {
node[shape=box,style="rounded,filled",fillcolor=white];
initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];
s1_1[label="Program\nTryStatement\nBlockStatement\nTryStatement\nBlockStatement\nIfStatement\nIdentifier (a)"];
s1_3[label="BlockStatement\nThrowStatement\nIdentifier (err)"];
s1_4[style="rounded,dashed,filled",fillcolor="#FF9800",label="<<unreachable>>\nBlockStatement:exit"];
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/code-path-analysis/try--try-finally-1.js
Expand Up @@ -19,7 +19,7 @@ digraph {
node[shape=box,style="rounded,filled",fillcolor=white];
initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];
s1_1[label="Program\nTryStatement\nBlockStatement\nExpressionStatement\nCallExpression\nIdentifier (foo)"];
s1_2[label="CallExpression:exit\nExpressionStatement:exit\nBlockStatement:exit"];
s1_3[label="BlockStatement\nExpressionStatement\nCallExpression\nIdentifier (bar)\nExpressionStatement\nCallExpression\nIdentifier (last)"];
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/code-path-analysis/try--try-finally-3.js
Expand Up @@ -17,7 +17,7 @@ last();
digraph {
node[shape=box,style="rounded,filled",fillcolor=white];
initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];
s1_1[label="Program\nTryStatement\nBlockStatement\nThrowStatement\nIdentifier (err)"];
s1_2[label="ThrowStatement:exit"];
s1_3[style="rounded,dashed,filled",fillcolor="#FF9800",label="<<unreachable>>\nBlockStatement:exit"];
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/code-path-analysis/try--try-finally-4.js
Expand Up @@ -32,7 +32,7 @@ digraph {
node[shape=box,style="rounded,filled",fillcolor=white];
initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];
s1_1[label="Program\nTryStatement\nBlockStatement\nTryStatement\nBlockStatement\nIfStatement\nIdentifier (a)"];
s1_3[label="BlockStatement\nReturnStatement"];
s1_4[style="rounded,dashed,filled",fillcolor="#FF9800",label="<<unreachable>>\nBlockStatement:exit"];
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/code-path-analysis/try--try-finally-5.js
Expand Up @@ -31,7 +31,7 @@ digraph {
node[shape=box,style="rounded,filled",fillcolor=white];
initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize];
thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];
s1_1[label="Program\nTryStatement\nBlockStatement\nTryStatement\nBlockStatement\nIfStatement\nIdentifier (a)"];
s1_3[label="BlockStatement\nReturnStatement"];
s1_4[style="rounded,dashed,filled",fillcolor="#FF9800",label="<<unreachable>>\nBlockStatement:exit"];
Expand Down

0 comments on commit af705bf

Please sign in to comment.