Skip to content

Commit 1a226a1

Browse files
committed
C#/Java: Cleanup up printing of generated models.
1 parent 1d103f5 commit 1a226a1

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

misc/scripts/models-as-data/generate_flow_model.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,30 +173,21 @@ def makeContent(self):
173173
else:
174174
neutralAddsTo = ""
175175

176-
return f"""
177-
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
178-
# Definitions of taint steps in the {self.friendlyname} framework.
179-
176+
return f"""# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
177+
# Definitions of models for the {self.friendlyname} framework.
180178
extensions:
181-
{sinkAddsTo}
182-
{sourceAddsTo}
183-
{summaryAddsTo}
184-
{neutralAddsTo}
185-
"""
179+
{sinkAddsTo}{sourceAddsTo}{summaryAddsTo}{neutralAddsTo}"""
186180

187181
def makeTypeBasedContent(self):
188182
if self.generateTypeBasedSummaries:
189183
typeBasedSummaryAddsTo = self.getAddsTo("CaptureTypeBasedSummaryModels.ql", "extSummaryModel")
190184
else:
191185
typeBasedSummaryAddsTo = ""
192186

193-
return f"""
194-
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
187+
return f"""# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
195188
# Definitions of type based summaries in the {self.friendlyname} framework.
196-
197189
extensions:
198-
{typeBasedSummaryAddsTo}
199-
"""
190+
{typeBasedSummaryAddsTo}"""
200191

201192
def save(self, content, target):
202193
with open(target, "w") as targetYml:

0 commit comments

Comments
 (0)