Skip to content

Commit 25cdf94

Browse files
authored
Ensuring no todo markers on main (#1628)
* refactor: prune slipped todos * refactor: main lint guard * refactor: fix gihub typo
1 parent 74321e6 commit 25cdf94

File tree

8 files changed

+24
-8
lines changed

8 files changed

+24
-8
lines changed

.github/workflows/qa.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,30 @@ jobs:
8585
- name: "👩‍🏫 Run linter"
8686
run: bash .github/workflows/scripts/run-flowr-command.sh lint-local
8787

88+
lint-main:
89+
needs: [ debug ]
90+
name: "👩‍🏫 Linting on Main"
91+
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') || github.base_ref == 'main' }}
92+
runs-on: ubuntu-22.04
93+
steps:
94+
- name: "🛒 Checkout Repository"
95+
uses: actions/checkout@v4
96+
with:
97+
submodules: true
98+
99+
- name: "🌍 Load Versions to Use"
100+
id: doc-global-versions
101+
run: bash .github/workflows/scripts/global-configuration.sh
102+
103+
- name: "⬇️ Use Node.js"
104+
uses: actions/setup-node@v4
105+
with:
106+
node-version: ${{ env.ACTION_NODE_VERSION }}
107+
registry-url: "https://registry.npmjs.org/"
108+
109+
- name: "👩‍🏫 Run linter"
110+
run: bash .github/workflows/scripts/run-flowr-command.sh lint
111+
88112
test:
89113
needs: [ debug ]
90114
name: "⚗️ Test Suite (coverage)"

src/control-flow/basic-cfg-guided-visitor.ts

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export class BasicCfgGuidedVisitor<
3232

3333
constructor(config: Config) {
3434
this.config = { ...config };
35-
// TODO: as an optimization invert the CFG when default order is forward
3635
this.visited = new Map<NodeId, number>();
3736
}
3837

src/control-flow/cfg-to-basic-blocks.ts

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export function convertCfgToBasicBlocks(cfInfo: ControlFlowInformation): Control
4848
}
4949
}
5050

51-
// TODO: check in and outputs to attach entry and exit points
5251
const findEntries = cfInfo.entryPoints.map(e => newCfg.getBasicBlock(e)?.id);
5352
const findExits = cfInfo.exitPoints.map(e => newCfg.getBasicBlock(e)?.id);
5453

src/control-flow/control-flow-graph.ts

-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ export class ControlFlowGraph<Vertex extends CfgSimpleVertex = CfgSimpleVertex>
251251
// remove all bbChildren with id as target
252252
for(const [a, b] of this.bbChildren.entries()) {
253253
if(b === id) {
254-
// TODO: check for modify on iterate
255254
this.bbChildren.delete(a);
256255
}
257256
}

src/control-flow/dfg-cfg-guided-visitor.ts

-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,4 @@ export class DataflowAwareCfgGuidedVisitor<
3434
protected getDataflowGraph(id: NodeId): DataflowGraphVertexArgument | undefined {
3535
return this.config.dataflow.graph.getVertex(id);
3636
}
37-
38-
// TODO: check whether functions are overloaded, resolve calls, provide origin, ...
3937
}

src/control-flow/extract-cfg.ts

-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ function cfgFunctionCallWithDataflow(graph: DataflowGraph): typeof cfgFunctionCa
358358
/* try to resolve the call and link the target definitions */
359359
const targets = getAllFunctionCallTargets(call.info.id, graph);
360360

361-
// TODO: use cfgFunctionCall with resolve-dcall exit and than link toi that so wthat we do not ahve multiple exit points
362361
const exits: NodeId[] = [];
363362
const callVertex = baseCFG.graph.getVertex(call.info.id);
364363
guard(callVertex !== undefined, 'cfgFunctionCallWithDataflow: call vertex not found');

src/dataflow/origin/dfg-get-origin.ts

-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ function getCallTarget(dfg: DataflowGraph, call: DataflowGraphVertexFunctionCall
155155
if(get?.tag !== VertexType.FunctionDefinition && get?.tag !== VertexType.VariableDefinition) {
156156
return undefined;
157157
}
158-
// TODO: if the _target_ resolve just returns a symbol and not a fd, we have to go transitive
159158
return {
160159
type: get.tag === VertexType.FunctionDefinition ? (OriginType.FunctionCallOrigin as const) : (OriginType.ReadVariableOrigin as const),
161160
id: target

test/functionality/control-flow/cfg-happens-before.test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ describe.sequential('Happens Before', withShell(shell => {
1616
assertHappensBefore(shell, 'x<-1\nif(u) x <- 2\nx <- 3', a, b, t);
1717
}
1818
assertHappensBefore(shell, 'x<-1\nif(u) x <- 2 else x <- 3\nx <- 4', '1@x', '3@x', Ternary.Always);
19-
// TODO: check for function calls
2019
}));

0 commit comments

Comments
 (0)