-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cmd add modality #340
base: develop
Are you sure you want to change the base?
Cmd add modality #340
Conversation
} | ||
|
||
var study = template.Tables.Single(t => t.TableName.Equals(StudyTable)); | ||
var series = template.Tables.Single(t => t.TableName.Equals(SeriesTable)); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable
|
||
var study = template.Tables.Single(t => t.TableName.Equals(StudyTable)); | ||
var series = template.Tables.Single(t => t.TableName.Equals(SeriesTable)); | ||
var image = template.Tables.Single(t => t.TableName.Equals(ImageTable)); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable
private readonly DiscoveredDatabase _live; | ||
private readonly LoadMetadata _lmd; | ||
private readonly string _prefix; | ||
private ExecuteCommandCreateNewImagingDatasetSuite _schemaCreationCommand; |
Check notice
Code scanning / CodeQL
Missed 'readonly' opportunity
catch (Exception ex) | ||
{ | ||
SetImpossible($"Could not get single live server from the LoadMetadata {lmd} :" + ex); | ||
return; | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause
if (modality.EndsWith("_")) | ||
{ | ||
_prefix = modality; | ||
} | ||
else | ||
{ | ||
_prefix = modality + "_"; | ||
} |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
foreach (var n in new[] { StudyTable, SeriesTable, ImageTable }) | ||
{ | ||
if (template.Tables.Any(t => t.TableName.Equals(n))) | ||
{ | ||
SetImpossible($"Template did not contain an expected table name: {n}. Table names in template were {string.Join(",", template.Tables.Select(t => t.TableName))}"); | ||
return; | ||
} | ||
} |
Check notice
Code scanning / CodeQL
Missed opportunity to use Where
} | ||
} | ||
|
||
var study = template.Tables.Single(t => t.TableName.Equals(StudyTable)); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable
Add a function to populate a new modality