Примеры ошибок, обнаруженных с помощью диагностики V3078


V3078. Original sorting order will be lost after repetitive call to 'OrderBy' method. Use 'ThenBy' method to preserve the original sorting.


SharpDevelop

V3078 Original sorting order will be lost after repetitive call to 'OrderBy' method. Use 'ThenBy' method to preserve the original sorting. CodeCoverageMethodElement.cs 124


void Init()
{
  ....
  this.SequencePoints.OrderBy(item => item.Line)
                     .OrderBy(item => item.Column);
}

Telerik UI for UWP

V3078 Original sorting order will be lost after repetitive call to 'OrderBy' method. Use 'ThenBy' method to preserve the original sorting. GridModel.Selection.cs 107


private void BuildCellSelectionRegions(....)
{
  ....
  this.MergeCellSelectionRegions(selectedItemsInView
      .OrderBy(c => c.Column.ItemInfo.LayoutInfo.Line)
      .OrderBy(c => c.RowItemInfo.LayoutInfo.Line));
}


Найденные ошибки

Проверено проектов
361
Собрано ошибок
13 417

А ты совершаешь ошибки в коде?

Проверь с помощью
PVS-Studio

Статический анализ
кода для C, C++, C#
и Java

goto PVS-Studio;