mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Static check errors. #116
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Backs on GitHub (May 24, 2017).
I checked solution with PVS-Studio and found some problems:
High level errors:
V3095 The 'container' object was used before it was verified against null. Check lines: 154, 178. AbbreviationParser.cs 154
V3095 The 'table.ColumnDefinitions' object was used before it was verified against null. Check lines: 40, 88. HtmlTableRenderer.cs 40
V3095 The 'columnSlice.BlockProcessor' object was used before it was verified against null. Check lines: 198, 203. GridTableParser.cs 198
V3022 Expression '(c < 'A' || c > 'Z') && (c < 'a' && c > 'z')' is always false. HtmlHelper.cs 620
V3022 Expression 'endState == 1' is always true. HeadingBlockParser.cs 98
V3022 Expression 'state > 0 && builder.Length >= 32' is always false. LinkHelper.cs 178
V3022 Expression 'state > 0' is always false. LinkHelper.cs 196
V3022 Expression 'pc == '.' || pc == '-'' is always false. LinkHelper.cs 250
V3022 Expression 'NewBlocks.Count > 0' is always false. BlockProcessor.cs 621
Medium level errors:
V3072 The 'AutoIdentifierExtension' class containing IDisposable members does not itself implement IDisposable. Inspect: headingWriter. AutoIdentifierExtension.cs 20
V3063 A part of conditional expression is always true if it is evaluated: state <= 0. LinkHelper.cs 165
V3062 An object 'openDelimiter' is used as an argument to its own method. Consider checking the first actual argument of the 'MoveChildrenAfter' method. EmphasisInlineParser.cs 331
Low level errors:
V051 Some of the references in 'Markdig.WebApp' project are missing or incorrect. The analysis results could be incomplete. Consider making the project fully compilable and building it before analysis. 0
V3022 Expression 'simpleBench' is always false. Program.cs 100
V3024 An odd precise comparison: tableColumnDefinition.Width != 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) > Epsilon. HtmlTableRenderer.cs 31
V3024 An odd precise comparison: tableColumnDefinition.Width != 1.0f. Consider using a comparison with defined precision: Math.Abs(A - B) > Epsilon. HtmlTableRenderer.cs 31
V3111 Checking value of 'element' for null will always return false when generic type is instantiated with a value type. OrderedList.cs 27
V3111 Checking value of 'element' for null will always return false when generic type is instantiated with a value type. OrderedList.cs 81
@xoofx commented on GitHub (May 28, 2017):
Thanks, I have pushed fixes to the relevant problems.