Shared: add outdated sink kind msg to 'getInvalidModelKind' for all languages

This commit is contained in:
Jami Cogswell 2023-06-05 09:16:42 -04:00
Родитель 76f5dca861
Коммит 62ac0dc471
6 изменённых файлов: 36 добавлений и 12 удалений

Просмотреть файл

@ -216,9 +216,13 @@ module ModelValidation {
result = "Invalid kind \"" + kind + "\" in sink model."
)
or
exists(string kind | sourceModel(_, _, _, _, _, _, _, kind, _) |
exists(string kind, string msg | sourceModel(_, _, _, _, _, _, _, kind, _) |
not kind instanceof ValidSourceKind and
result = "Invalid kind \"" + kind + "\" in source model."
msg = "Invalid kind \"" + kind + "\" in sink model." and
// The part of this message that refers to outdated sink kinds can be deleted after June 1st, 2024.
if kind instanceof OutdatedSinkKind
then result = msg + " " + kind.(OutdatedSinkKind).outdatedMessage()
else result = msg
)
or
exists(string kind | neutralModel(_, _, _, _, kind, _) |

Просмотреть файл

@ -195,9 +195,13 @@ module ModelValidation {
result = "Invalid kind \"" + kind + "\" in summary model."
)
or
exists(string kind | sinkModel(_, _, _, _, _, _, _, kind, _) |
exists(string kind, string msg | sinkModel(_, _, _, _, _, _, _, kind, _) |
not kind instanceof ValidSinkKind and
result = "Invalid kind \"" + kind + "\" in sink model."
msg = "Invalid kind \"" + kind + "\" in sink model." and
// The part of this message that refers to outdated sink kinds can be deleted after June 1st, 2024.
if kind instanceof OutdatedSinkKind
then result = msg + " " + kind.(OutdatedSinkKind).outdatedMessage()
else result = msg
)
or
exists(string kind | sourceModel(_, _, _, _, _, _, _, kind, _) |

Просмотреть файл

@ -661,9 +661,13 @@ module ModelOutput {
result = "Invalid kind \"" + kind + "\" in summary model."
)
or
exists(string kind | sinkModel(_, _, kind) |
exists(string kind, string msg | sinkModel(_, _, kind) |
not kind instanceof ValidSinkKind and
result = "Invalid kind \"" + kind + "\" in sink model."
msg = "Invalid kind \"" + kind + "\" in sink model." and
// The part of this message that refers to outdated sink kinds can be deleted after June 1st, 2024.
if kind instanceof OutdatedSinkKind
then result = msg + " " + kind.(OutdatedSinkKind).outdatedMessage()
else result = msg
)
or
exists(string kind | sourceModel(_, _, kind) |

Просмотреть файл

@ -661,9 +661,13 @@ module ModelOutput {
result = "Invalid kind \"" + kind + "\" in summary model."
)
or
exists(string kind | sinkModel(_, _, kind) |
exists(string kind, string msg | sinkModel(_, _, kind) |
not kind instanceof ValidSinkKind and
result = "Invalid kind \"" + kind + "\" in sink model."
msg = "Invalid kind \"" + kind + "\" in sink model." and
// The part of this message that refers to outdated sink kinds can be deleted after June 1st, 2024.
if kind instanceof OutdatedSinkKind
then result = msg + " " + kind.(OutdatedSinkKind).outdatedMessage()
else result = msg
)
or
exists(string kind | sourceModel(_, _, kind) |

Просмотреть файл

@ -661,9 +661,13 @@ module ModelOutput {
result = "Invalid kind \"" + kind + "\" in summary model."
)
or
exists(string kind | sinkModel(_, _, kind) |
exists(string kind, string msg | sinkModel(_, _, kind) |
not kind instanceof ValidSinkKind and
result = "Invalid kind \"" + kind + "\" in sink model."
msg = "Invalid kind \"" + kind + "\" in sink model." and
// The part of this message that refers to outdated sink kinds can be deleted after June 1st, 2024.
if kind instanceof OutdatedSinkKind
then result = msg + " " + kind.(OutdatedSinkKind).outdatedMessage()
else result = msg
)
or
exists(string kind | sourceModel(_, _, kind) |

Просмотреть файл

@ -271,9 +271,13 @@ module CsvValidation {
result = "Invalid kind \"" + kind + "\" in summary model."
)
or
exists(string kind | sinkModel(_, _, _, _, _, _, _, kind, _) |
exists(string kind, string msg | sinkModel(_, _, _, _, _, _, _, kind, _) |
not kind instanceof ValidSinkKind and
result = "Invalid kind \"" + kind + "\" in sink model."
msg = "Invalid kind \"" + kind + "\" in sink model." and
// The part of this message that refers to outdated sink kinds can be deleted after June 1st, 2024.
if kind instanceof OutdatedSinkKind
then result = msg + " " + kind.(OutdatedSinkKind).outdatedMessage()
else result = msg
)
or
exists(string kind | sourceModel(_, _, _, _, _, _, _, kind, _) |