Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix fixedsize attribute in code path analysis DOT debug output #17202

Merged
merged 1 commit into from May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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