sillsdev / solid

Solid is a software tool that can be used to check, clean up, and convert Standard Format (e.g. Toolbox) lexicon data.
MIT License
0 stars 2 forks source link

238 compiler warnings when building Solid #20

Open megahirt opened 1 week ago

megahirt commented 1 week ago

There are currently 238 compiler warnings, mostly about nullable values I think, when building with a recent .Net SDK. We should fix up our code per the recommendations in the warnings.

C:\src\solid\src\SolidGui\Engine\SolidStructureProperty.cs(12,16): warning CS8618: Non-nullable field '_parent' must co
ntain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\S
olidGui.csproj]
C:\src\solid\src\SolidGui\DataShapesDialog.cs(23,16): warning CS8618: Non-nullable field '_shapes' must contain a non-n
ull value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cspro
j]
C:\src\solid\src\SolidGui\DataShapesDialog.cs(23,16): warning CS8618: Non-nullable field '_searchDialog' must contain a
 non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui
.csproj]
C:\src\solid\src\SolidGui\DataShapesDialog.cs(23,16): warning CS8618: Non-nullable field '_mainWindowPm' must contain a
 non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui
.csproj]
C:\src\solid\src\SolidGui\Engine\StructurePropertiesPM.cs(19,16): warning CS8618: Non-nullable field '_markerSetting' m
ust contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\Soli
dGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Engine\StructurePropertiesPM.cs(19,16): warning CS8618: Non-nullable event 'StructureSettingC
hanged' must contain a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid
\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\DataValuesDialog.cs(15,16): warning CS8618: Non-nullable field '_mainWindowPm' must contain a
 non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui
.csproj]
C:\src\solid\src\SolidGui\Engine\SolidStructureProperty.cs(18,16): warning CS8618: Non-nullable field '_parent' must co
ntain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\S
olidGui.csproj]
C:\src\solid\src\SolidGui\Engine\SolidStructureProperty.cs(24,16): warning CS8618: Non-nullable field '_parent' must co
ntain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\S
olidGui.csproj]
C:\src\solid\src\SolidGui\AppWritingSystems.cs(13,49): warning CS8618: Non-nullable field '_sWritingSystemsRepository'
must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\Sol
idGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Engine\SolidSettings.cs(29,16): warning CS8618: Non-nullable property 'FilePath' must contain
 a non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\solid\src\SolidGui\Sol
idGui.csproj]
C:\src\solid\src\SolidGui\TemplateChooser.cs(18,16): warning CS8618: Non-nullable property 'TemplatePaths' must contain
 a non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\solid\src\SolidGui\Sol
idGui.csproj]
C:\src\solid\src\SolidGui\QuickFixer.cs(187,45): warning CS8600: Converting null literal or possible null value to non-
nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Engine\ReportEntry.cs(23,16): warning CS8618: Non-nullable field '_entryName' must contain a
non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.
csproj]
C:\src\solid\src\SolidGui\Engine\ReportEntry.cs(23,16): warning CS8618: Non-nullable field '_marker' must contain a non
-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.csp
roj]
C:\src\solid\src\SolidGui\Engine\SfmField.cs(33,31): warning CS8601: Possible null reference assignment. [C:\src\solid\
src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\StructurePropertiesView.cs(35,16): warning CS8618: Non-nullable field '_model' must contain a
 non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui
.csproj]
C:\src\solid\src\SolidGui\Export\ExportFactory.cs(39,32): warning CS8600: Converting null literal or possible null valu
e to non-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\ExportFactory.cs(49,20): warning CS8603: Possible null reference return. [C:\src\solid
\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\ExportFactory.cs(15,50): warning CS8625: Cannot convert null literal to non-nullable r
eference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\ExportHeader.cs(53,35): warning CS8600: Converting null literal or possible null value
 to non-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\ExportHeader.cs(64,16): warning CS8618: Non-nullable field '_name' must contain a non-
null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cspr
oj]
C:\src\solid\src\SolidGui\Export\ExportHeader.cs(64,16): warning CS8618: Non-nullable field '_fileNameFilter' must cont
ain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\Sol
idGui.csproj]
C:\src\solid\src\SolidGui\Export\ExportHeader.cs(64,16): warning CS8618: Non-nullable field '_driver' must contain a no
n-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cs
proj]
C:\src\solid\src\SolidGui\Export\ExportHeader.cs(64,16): warning CS8618: Non-nullable field '_filePath' must contain a
non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.
csproj]
C:\src\solid\src\SolidGui\QuickFixer.cs(246,37): warning CS8625: Cannot convert null literal to non-nullable reference
type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\QuickFixer.cs(250,21): warning CS8625: Cannot convert null literal to non-nullable reference
type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Engine\SolidReport.cs(43,16): warning CS8618: Non-nullable property 'FilePath' must contain a
 non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\solid\src\SolidGui\Solid
Gui.csproj]
C:\src\solid\src\SolidGui\QuickFixer.cs(311,36): warning CS8625: Cannot convert null literal to non-nullable reference
type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\QuickFixer.cs(346,20): warning CS8603: Possible null reference return. [C:\src\solid\src\Soli
dGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(227,37): warning CS8600: Converting null literal or possible
 null value to non-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(247,49): warning CS8600: Converting null literal or possible
 null value to non-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(248,45): warning CS8600: Converting null literal or possible
 null value to non-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(467,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(471,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(474,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(477,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(480,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(484,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(493,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(497,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(501,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(505,84): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseNote(string unicodeValue, string writingSystem, LexSense se
nse, string noteType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(510,33): warning CS8602: Dereference of a possibly null refe
rence. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(515,33): warning CS8602: Dereference of a possibly null refe
rence. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(518,33): warning CS8602: Dereference of a possibly null refe
rence. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(522,33): warning CS8602: Dereference of a possibly null refe
rence. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(525,102): warning CS8604: Possible null reference argument f
or parameter 'dataObject' in 'void SfmLiftLexEntryAdapter.AddMultiTextToPalasoDataObject(string fieldValue, string writ
ingSystem, PalasoDataObject dataObject, string propertyName)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(528,102): warning CS8604: Possible null reference argument f
or parameter 'dataObject' in 'void SfmLiftLexEntryAdapter.AddMultiTextToPalasoDataObject(string fieldValue, string writ
ingSystem, PalasoDataObject dataObject, string propertyName)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(532,33): warning CS8602: Dereference of a possibly null refe
rence. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(543,102): warning CS8604: Possible null reference argument f
or parameter 'dataObject' in 'void SfmLiftLexEntryAdapter.AddMultiTextToPalasoDataObject(string fieldValue, string writ
ingSystem, PalasoDataObject dataObject, string propertyName)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(546,88): warning CS8604: Possible null reference argument fo
r parameter 'sense' in 'void SfmLiftLexEntryAdapter.AddSenseReversal(string unicodeValue, string writingSystem, LexSens
e sense, string reversalType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(554,78): warning CS8604: Possible null reference argument fo
r parameter 'key' in 'KeyValuePair<LexSense, Relation>.KeyValuePair(LexSense key, Relation value)'. [C:\src\solid\src\S
olidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(566,64): warning CS8604: Possible null reference argument fo
r parameter 'currentSense' in 'void SfmLiftLexEntryAdapter.AddSenseRelation(StateInfo currentState, LexSense currentSen
se, string unicodeValue, string relationType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(569,64): warning CS8604: Possible null reference argument fo
r parameter 'currentSense' in 'void SfmLiftLexEntryAdapter.AddSenseRelation(StateInfo currentState, LexSense currentSen
se, string unicodeValue, string relationType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(574,64): warning CS8604: Possible null reference argument fo
r parameter 'currentSense' in 'void SfmLiftLexEntryAdapter.AddSenseRelation(StateInfo currentState, LexSense currentSen
se, string unicodeValue, string relationType)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(583,33): warning CS8602: Dereference of a possibly null refe
rence. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(609,102): warning CS8604: Possible null reference argument f
or parameter 'dataObject' in 'void SfmLiftLexEntryAdapter.AddMultiTextToPalasoDataObject(string fieldValue, string writ
ingSystem, PalasoDataObject dataObject, string propertyName)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(612,102): warning CS8604: Possible null reference argument f
or parameter 'dataObject' in 'void SfmLiftLexEntryAdapter.AddMultiTextToPalasoDataObject(string fieldValue, string writ
ingSystem, PalasoDataObject dataObject, string propertyName)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(615,33): warning CS8602: Dereference of a possibly null refe
rence. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(618,33): warning CS8602: Dereference of a possibly null refe
rence. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(621,102): warning CS8604: Possible null reference argument f
or parameter 'dataObject' in 'void SfmLiftLexEntryAdapter.AddMultiTextToPalasoDataObject(string fieldValue, string writ
ingSystem, PalasoDataObject dataObject, string propertyName)'. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\QuickFixer.cs(362,20): warning CS8603: Possible null reference return. [C:\src\solid\src\Soli
dGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Engine\SolidSettings.cs(310,24): warning CS8603: Possible null reference return. [C:\src\soli
d\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\RecordFilterSet.cs(15,44): warning CS8625: Cannot convert null literal to non-nullable
 reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\RecordFilterSet.cs(42,45): warning CS8600: Converting null literal or possible null va
lue to non-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\RecordFilterSet.cs(102,20): warning CS8603: Possible null reference return. [C:\src\so
lid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\QuickFixer.cs(381,45): warning CS8600: Converting null literal or possible null value to non-
nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\FilterChooserPM.cs(28,39): warning CS8625: Cannot convert null literal to non-nullable
 reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\FilterChooserPM.cs(32,16): warning CS8618: Non-nullable field '_recordFilters' must co
ntain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\S
olidGui.csproj]
C:\src\solid\src\SolidGui\Filter\FilterChooserPM.cs(32,16): warning CS8618: Non-nullable field '_activeWarningFilter' m
ust contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\Soli
dGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\FilterChooserPM.cs(32,16): warning CS8618: Non-nullable event 'WarningFilterChanged' m
ust contain a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\src\Soli
dGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\FilterChooserView.cs(24,16): warning CS8618: Non-nullable field '_model' must contain
a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGu
i.csproj]
C:\src\solid\src\SolidGui\Filter\RecordFilter.cs(13,20): warning CS8625: Cannot convert null literal to non-nullable re
ference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\FilterChooserPM.cs(77,39): warning CS8625: Cannot convert null literal to non-nullable
 reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\FilterChooserPM.cs(83,30): warning CS8625: Cannot convert null literal to non-nullable
 reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\FilterChooserPM.cs(84,36): warning CS8625: Cannot convert null literal to non-nullable
 reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\RecordFilterSet.cs(183,28): warning CS8625: Cannot convert null literal to non-nullabl
e reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Filter\RecordFilterSet.cs(184,34): warning CS8625: Cannot convert null literal to non-nullabl
e reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\Record.cs(58,16): warning CS8618: Non-nullable field '_report' must contain a non-null
value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\Record.cs(67,22): warning CS8601: Possible null reference assignment. [C:\src\solid\src
\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\Record.cs(64,16): warning CS8618: Non-nullable field '_report' must contain a non-null
value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\RecordFormatter.cs(57,16): warning CS8618: Non-nullable field 'Separator' must contain
a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGu
i.csproj]
C:\src\solid\src\SolidGui\Model\RecordFormatter.cs(57,16): warning CS8618: Non-nullable field 'NewLine' must contain a
non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.
csproj]
C:\src\solid\src\SolidGui\Filter\RecordFilter.cs(180,20): warning CS8603: Possible null reference return. [C:\src\solid
\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\RecordManager.cs(15,20): warning CS8603: Possible null reference return. [C:\src\solid\
src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\RecordManager.cs(20,20): warning CS8603: Possible null reference return. [C:\src\solid\
src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\SfmLexEntry.cs(73,24): warning CS8603: Possible null reference return. [C:\src\solid\sr
c\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\RecordManager.cs(27,24): warning CS8603: Possible null reference return. [C:\src\solid\
src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\RecordFormatter.cs(232,44): warning CS8625: Cannot convert null literal to non-nullable
 reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\SfmDictionary.cs(54,16): warning CS8618: Non-nullable field '_markerFrequencies' must c
ontain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\
SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\SfmDictionary.cs(54,16): warning CS8618: Non-nullable field '_markerErrors' must contai
n a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\Solid
Gui.csproj]
C:\src\solid\src\SolidGui\Model\SfmDictionary.cs(54,16): warning CS8618: Non-nullable property 'SfmHeader' must contain
 a non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\solid\src\SolidGui\Sol
idGui.csproj]
C:\src\solid\src\SolidGui\Model\Record.cs(23,42): warning CS8618: Non-nullable event 'RecordTextChanged' must contain a
 non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\src\SolidGui\SolidGui
.csproj]
C:\src\solid\src\SolidGui\Export\SfmLiftLexEntryAdapter.cs(180,27): warning CS8618: Non-nullable property 'WritingSyste
m' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\solid\s
rc\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\SfmFieldModel.cs(43,16): warning CS8618: Non-nullable field '_parent' must contain a no
n-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cs
proj]
C:\src\solid\src\SolidGui\Model\SfmFieldModel.cs(43,16): warning CS8618: Non-nullable field 'Closers' must contain a no
n-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cs
proj]
C:\src\solid\src\SolidGui\Model\SfmFieldModel.cs(43,16): warning CS8618: Non-nullable property 'Mapping' must contain a
 non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\solid\src\SolidGui\Solid
Gui.csproj]
C:\src\solid\src\SolidGui\Model\SfmFieldModel.cs(43,16): warning CS8618: Non-nullable field '_trailing' must contain a
non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.
csproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_warningFilterChooserModel' must
contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui
\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_markerSettingsModel' must contai
n a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\Solid
Gui.csproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_navigatorModel' must contain a n
on-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.c
sproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_recordFilters' must contain a no
n-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cs
proj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_sfmEditorModel' must contain a n
on-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.c
sproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_workingDictionary' must contain
a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGu
i.csproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_realDictionaryPath' must contain
 a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidG
ui.csproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_searchModel' must contain a non-
null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cspr
oj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable field '_editorRecordFormatter' must cont
ain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\Sol
idGui.csproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(56,16): warning CS8618: Non-nullable event 'EditorRecordFormatterChanged' mus
t contain a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\src\SolidG
ui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\RecordFormatter.cs(256,46): warning CS8604: Possible null reference argument for parame
ter 'solidSettings' in 'string RecordFormatter.GetValue(SfmFieldModel field, SolidSettings solidSettings)'. [C:\src\sol
id\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Mapping\MappingView.cs(22,16): warning CS8618: Non-nullable field '_model' must contain a non
-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.csp
roj]
C:\src\solid\src\SolidGui\MainWindowView.cs(65,16): warning CS8618: Non-nullable field '_mainWindowPM' must contain a n
on-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.c
sproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(65,16): warning CS8618: Non-nullable field '_searchDialog' must contain a n
on-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.c
sproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(65,16): warning CS8618: Non-nullable field '_dataShapesDialog' must contain
 a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidG
ui.csproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(65,16): warning CS8618: Non-nullable field '_dataValuesDialog' must contain
 a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidG
ui.csproj]
C:\src\solid\src\SolidGui\Mapping\MappingView.cs(83,46): warning CS8625: Cannot convert null literal to non-nullable re
ference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\SfmFieldModel.cs(198,31): warning CS8601: Possible null reference assignment. [C:\src\s
olid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Mapping\MappingPM.cs(34,16): warning CS8618: Non-nullable field '_targetSystem' must contain
a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGu
i.csproj]
C:\src\solid\src\SolidGui\Mapping\MappingPM.cs(34,16): warning CS8618: Non-nullable field '_selectedConcept' must conta
in a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\Soli
dGui.csproj]
C:\src\solid\src\SolidGui\Mapping\MappingPM.cs(34,16): warning CS8618: Non-nullable property 'MarkerSetting' must conta
in a non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\solid\src\SolidGui\S
olidGui.csproj]
C:\src\solid\src\SolidGui\Mapping\MappingPM.cs(34,16): warning CS8618: Non-nullable event 'MappingSettingChanged' must
contain a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\src\SolidGui
\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(153,59): warning CS8602: Dereference of a possibly null reference. [C:\src\
solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\SfmDictionary.cs(103,24): warning CS8603: Possible null reference return. [C:\src\solid
\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(302,28): warning CS8603: Possible null reference return. [C:\src\solid\src\So
lidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerRulesPM.cs(19,16): warning CS8618: Non-nullable field '_selectedMarker' must contain a
non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.
csproj]
C:\src\solid\src\SolidGui\MarkerRulesPM.cs(19,16): warning CS8618: Non-nullable field '_allMarkers' must contain a non-
null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cspr
oj]
C:\src\solid\src\SolidGui\MarkerRulesPM.cs(19,16): warning CS8618: Non-nullable field '_rulesXmlPath' must contain a no
n-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cs
proj]
C:\src\solid\src\SolidGui\MainWindowView.cs(209,39): warning CS8600: Converting null literal or possible null value to
non-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Export\SaveOptionsDialog.cs(17,39): warning CS8618: Non-nullable field 'ShortTermMemory' must
 contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGu
i\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsPM.cs(38,52): warning CS8625: Cannot convert null literal to non
-nullable reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsPM.cs(17,16): warning CS8618: Non-nullable property 'SolidSettin
gs' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\solid\
src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsPM.cs(17,16): warning CS8618: Non-nullable event 'MarkerFilterCh
anged' must contain a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\
src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowPM.cs(339,43): warning CS8600: Converting null literal or possible null value to no
n-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Mapping\MappingPM.cs(177,20): warning CS8618: Non-nullable field '_node' must contain a non-n
ull value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.cspro
j]
C:\src\solid\src\SolidGui\MainWindowView.cs(256,35): warning CS8600: Converting null literal or possible null value to
non-nullable type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(271,32): warning CS8604: Possible null reference argument for parameter 'te
mplatePath' in 'void MainWindowView.Open(string fileName, string templatePath, bool forceUnicode)'. [C:\src\solid\src\S
olidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsPM.cs(130,38): warning CS8625: Cannot convert null literal to no
n-nullable reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Model\SfmDictionary.cs(339,31): warning CS8625: Cannot convert null literal to non-nullable r
eference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsDialog.cs(37,16): warning CS8618: Non-nullable field '_marker' m
ust contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\Soli
dGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsDialog.cs(37,16): warning CS8618: Non-nullable field '_currentMa
rkerSetting' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\
solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsDialog.cs(37,16): warning CS8618: Non-nullable property 'MarkerM
odel' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [C:\src\soli
d\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsDialog.cs(37,16): warning CS8618: Non-nullable event 'SettingCha
nged' must contain a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\s
rc\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsDialog.cs(37,16): warning CS8618: Non-nullable field '_wsModel'
must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\Sol
idGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsDialog.cs(37,16): warning CS8618: Non-nullable field '_store' mu
st contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\Solid
Gui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsDialog.cs(37,16): warning CS8618: Non-nullable field '_wsDialog'
 must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\So
lidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsMapper.cs(115,59): warning CS8625: Cannot convert null literal t
o non-nullable reference type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(555,43): warning CS8625: Cannot convert null literal to non-nullable refere
nce type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Processes\ProcessStructure.cs(324,38): warning CS8618: Non-nullable field '_appendTo' must co
ntain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\S
olidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(574,29): warning CS8625: Cannot convert null literal to non-nullable refere
nce type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(576,33): warning CS8625: Cannot convert null literal to non-nullable refere
nce type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(578,33): warning CS8625: Cannot convert null literal to non-nullable refere
nce type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MainWindowView.cs(617,20): warning CS8603: Possible null reference return. [C:\src\solid\src\
SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Program.cs(81,35): warning CS8600: Converting null literal or possible null value to non-null
able type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\Program.cs(88,48): warning CS8604: Possible null reference argument for parameter 'templatePa
th' in 'bool MainWindowPM.OpenDictionary(string dictionaryPath, string templatePath, bool forceUnicode)'. [C:\src\solid
\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\RecordNavigatorPM.cs(41,16): warning CS8618: Non-nullable field '_recordFilter' must contain
a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGu
i.csproj]
C:\src\solid\src\SolidGui\RecordNavigatorPM.cs(41,16): warning CS8618: Non-nullable event 'RecordChanged' must contain
a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\src\SolidGui\SolidGu
i.csproj]
C:\src\solid\src\SolidGui\RecordNavigatorPM.cs(41,16): warning CS8618: Non-nullable event 'NavFilterChanged' must conta
in a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\src\SolidGui\Soli
dGui.csproj]
C:\src\solid\src\SolidGui\RecordNavigatorPM.cs(60,71): warning CS8625: Cannot convert null literal to non-nullable refe
rence type. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsListView.cs(44,59): warning CS8602: Dereference of a possibly nu
ll reference. [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsListView.cs(40,16): warning CS8618: Non-nullable event 'MarkerSe
ttingPossiblyChanged' must contain a non-null value when exiting constructor. Consider declaring the event as nullable.
 [C:\src\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsListView.cs(40,16): warning CS8618: Non-nullable field '_diction
ary' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\sr
c\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsListView.cs(40,16): warning CS8618: Non-nullable field '_markerS
ettingsPm' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\so
lid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\MarkerSettings\MarkerSettingsListView.cs(40,16): warning CS8618: Non-nullable field '_markerS
ettingsDialog' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\sr
c\solid\src\SolidGui\SolidGui.csproj]
C:\src\solid\src\SolidGui\RecordNavigatorView.cs(27,16): warning CS8618: Non-nullable field '_model' must contain a non
-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGui.csp
roj]
C:\src\solid\src\SolidGui\RecordNavigatorView.cs(27,16): warning CS8618: Non-nullable event 'SearchButtonClicked' must
contain a non-null value when exiting constructor. Consider declaring the event as nullable. [C:\src\solid\src\SolidGui
\SolidGui.csproj]
C:\src\solid\src\SolidGui\ReportReader.cs(20,16): warning CS8618: Non-nullable field '_recordFilterNodes' must contain
a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\SolidGu
i.csproj]
C:\src\solid\src\SolidGui\ReportReader.cs(20,16): warning CS8618: Non-nullable field '_recordFilterNameNode' must conta
in a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidGui\Soli
dGui.csproj]
C:\src\solid\src\SolidGui\ReportReader.cs(20,16): warning CS8618: Non-nullable field '_recordFilterDescriptionNode' mus
t contain a non-null value when exiting constructor. Consider declaring the field as nullable. [C:\src\solid\src\SolidG
ui\SolidGui.csproj]

    238 Warning(s)
psh0078 commented 1 week ago

Have you had cases where the warnings suddenly cleared like this? I am not sure what exactly happened, but all the warnings just disappeared. image

josephmyers commented 1 week ago

I don't think it's building. You probably didn't make any changes, so it didn't need to rebuild.

psh0078 commented 1 week ago

I don't think it's building. You probably didn't make any changes, so it didn't need to rebuild.

I see that is what's happening.. I was able to rebuild and see the warnings now.

psh0078 commented 1 week ago

It looks like you can declare things with a nullable type by adding '?' at the end of their type. eg private IEnumerable<SfmDictionary.DataShape>? _shapes; This made the warning go away.

Or if we don't want to see all those question marks, we could use #nullable disable directive. This works, too

megahirt commented 1 week ago

I think that what we need to do in many cases is to add the question mark where it's obvious that the value is initialized to null.

See https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references