Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .llm/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ editing any skill with `pwsh -NoProfile -File scripts/generate-skills-index.ps1`
files. Dot-folders (`.llm`, `.github`) never get `.meta` files.
18. Keep agent/dev files out of the npm tarball: `package.json` `files` whitelists
only `Editor`, `Runtime`, `Tests`, `docs`, and their `.meta` companions.
19. Write explicit ordered comparisons with `<` or `<=`, reversing operands instead
of using `>` or `>=`. Relational patterns retain the operator required by C#
syntax. Keep `!=` when expressing genuine inequality or null checks; do not wrap
`==` in a negation merely to avoid it. Before reversing user-defined operators,
verify the swapped operands and paired operator preserve behavior.

### Skills Discipline

Expand Down
4 changes: 2 additions & 2 deletions Editor/DataVisualizer/Data/DataVisualizerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ internal bool SetLastObjectForType(string typeFullName, string guid)
}

if (
existingIndex >= 0
0 <= existingIndex
&& string.Equals(
lastObjectSelections[existingIndex].objectGuid,
guid,
Expand All @@ -193,7 +193,7 @@ internal bool SetLastObjectForType(string typeFullName, string guid)
return false;
}

if (existingIndex >= 0)
if (0 <= existingIndex)
{
lastObjectSelections[existingIndex].objectGuid = guid;
}
Expand Down
4 changes: 2 additions & 2 deletions Editor/DataVisualizer/Data/DataVisualizerUserState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public bool SetLastObjectForType(string typeFullName, string guid)
}

if (
existingIndex >= 0
0 <= existingIndex
&& string.Equals(
lastObjectSelections[existingIndex].objectGuid,
guid,
Expand All @@ -139,7 +139,7 @@ public bool SetLastObjectForType(string typeFullName, string guid)
return false;
}

if (existingIndex >= 0)
if (0 <= existingIndex)
{
lastObjectSelections[existingIndex].objectGuid = guid;
}
Expand Down
5 changes: 3 additions & 2 deletions Editor/DataVisualizer/Data/NamespaceCollapseState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ public static bool Remove(List<NamespaceCollapseState> states, string namespaceK
return false;
}

return states.RemoveAll(state =>
return 0
< states.RemoveAll(state =>
string.Equals(state?.namespaceKey, namespaceKey, StringComparison.Ordinal)
) > 0;
);
}

public NamespaceCollapseState Clone()
Expand Down
2 changes: 1 addition & 1 deletion Editor/DataVisualizer/Data/NamespaceTypeOrder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ IReadOnlyList<string> typeFullNameOrder

switch (indexA)
{
case >= 0 when indexB >= 0:
case >= 0 when 0 <= indexB:
return indexA.CompareTo(indexB);
case >= 0:
return -1;
Expand Down
Loading