Skip to content

Commit bfae507

Browse files
committed
Fix formatting of changed source files
1 parent 11c8f44 commit bfae507

File tree

3 files changed

+41
-40
lines changed

3 files changed

+41
-40
lines changed

src/SIL.Machine.Morphology.HermitCrab/Allomorph.cs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -159,44 +159,44 @@ protected virtual bool CheckAllomorphConstraints(Morpher morpher, Allomorph allo
159159
{
160160
if (AllomorphCoOccurrenceRules.Count > 0)
161161
{
162-
foreach (var rule in AllomorphCoOccurrenceRules)
162+
foreach (var rule in AllomorphCoOccurrenceRules)
163163
{
164-
if (!rule.IsWordValid(allomorph, word))
165-
{
166-
if (morpher != null && morpher.TraceManager.IsTracing)
167-
{
168-
morpher.TraceManager.Failed(
169-
morpher.Language,
170-
word,
171-
FailureReason.AllomorphCoOccurrenceRules,
172-
this,
173-
rule
174-
);
175-
}
164+
if (!rule.IsWordValid(allomorph, word))
165+
{
166+
if (morpher != null && morpher.TraceManager.IsTracing)
167+
{
168+
morpher.TraceManager.Failed(
169+
morpher.Language,
170+
word,
171+
FailureReason.AllomorphCoOccurrenceRules,
172+
this,
173+
rule
174+
);
175+
}
176176
return false;
177-
}
177+
}
178178
}
179179
}
180180

181-
if (Morpheme.MorphemeCoOccurrenceRules.Count > 0)
182-
{
183-
foreach (MorphemeCoOccurrenceRule rule in Morpheme.MorphemeCoOccurrenceRules)
184-
{
185-
// We need to check each one in turn and report any failure
186-
if (!rule.IsWordValid(Morpheme, word))
187-
{
188-
if (morpher != null && morpher.TraceManager.IsTracing)
189-
{
190-
morpher.TraceManager.Failed(
191-
morpher.Language,
192-
word,
193-
FailureReason.MorphemeCoOccurrenceRules,
194-
this,
195-
rule
196-
);
197-
}
198-
return false;
199-
}
181+
if (Morpheme.MorphemeCoOccurrenceRules.Count > 0)
182+
{
183+
foreach (MorphemeCoOccurrenceRule rule in Morpheme.MorphemeCoOccurrenceRules)
184+
{
185+
// We need to check each one in turn and report any failure
186+
if (!rule.IsWordValid(Morpheme, word))
187+
{
188+
if (morpher != null && morpher.TraceManager.IsTracing)
189+
{
190+
morpher.TraceManager.Failed(
191+
morpher.Language,
192+
word,
193+
FailureReason.MorphemeCoOccurrenceRules,
194+
this,
195+
rule
196+
);
197+
}
198+
return false;
199+
}
200200
}
201201
}
202202

src/SIL.Machine.Morphology.HermitCrab/Morpher.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,12 +565,13 @@ private bool IsWordValid(Word word)
565565
return false;
566566
}
567567

568-
Feature feature = word.ObligatorySyntacticFeatures.FirstOrDefault(f =>
569-
!ContainsFeature(
570-
word.SyntacticFeatureStruct,
571-
f,
572-
new HashSet<FeatureStruct>(new ReferenceEqualityComparer<FeatureStruct>())
573-
)
568+
Feature feature = word.ObligatorySyntacticFeatures.FirstOrDefault(
569+
f =>
570+
!ContainsFeature(
571+
word.SyntacticFeatureStruct,
572+
f,
573+
new HashSet<FeatureStruct>(new ReferenceEqualityComparer<FeatureStruct>())
574+
)
574575
);
575576
if (feature != null)
576577
{

tests/SIL.Machine.Morphology.HermitCrab.Tests/MorpherTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public void AnalyzeWord_CannotAnalyzeDueToAllomorphCooccurenceFailure_ReturnsEmp
146146
Lhs = { Pattern<Word, ShapeNode>.New("1").Annotation(any).OneOrMore.Value },
147147
Rhs = { new CopyFromInput("1"), new InsertSegments(Table3, "+d") }
148148
}
149-
);
149+
);
150150
Morphophonemic.MorphologicalRules.Add(edSuffix);
151151

152152
var edAllo = edSuffix.GetAllomorph(0);

0 commit comments

Comments
 (0)