Merge branch 'master' of https://github.com/Hackerpilot/Dscanner
This commit is contained in:
commit
f461c42755
|
@ -11,7 +11,7 @@ import stdx.d.lexer;
|
|||
import analysis.base;
|
||||
|
||||
/**
|
||||
* Checks for use of the deprecated "delete" keyword
|
||||
* Checks for long and hard-to-read number literals
|
||||
*/
|
||||
class NumberStyleCheck : BaseAnalyzer
|
||||
{
|
||||
|
@ -26,8 +26,8 @@ class NumberStyleCheck : BaseAnalyzer
|
|||
{
|
||||
import std.algorithm;
|
||||
if (isNumberLiteral(t.type) && !t.text.startsWith("0x")
|
||||
&& ((t.text.startsWith("0b") && t.text.matchFirst(badBinaryRegex))
|
||||
|| t.text.matchFirst(badDecimalRegex)))
|
||||
&& ((t.text.startsWith("0b") && !t.text.matchFirst(badBinaryRegex).empty)
|
||||
|| !t.text.matchFirst(badDecimalRegex).empty))
|
||||
{
|
||||
addErrorMessage(t.line, t.column,
|
||||
"Use underscores to improve number constant readability");
|
||||
|
|
|
@ -1 +1 @@
|
|||
dmd main.d stats.d imports.d highlighter.d ctags.d astprinter.d formatter.d outliner.d stdx/*.d stdx/d/*.d analysis/*.d -ofdscanner -m64 -g -O -release -noboundscheck -inline
|
||||
dmd main.d stats.d imports.d highlighter.d ctags.d astprinter.d formatter.d outliner.d stdx/lexer.d stdx/d/ast.d stdx/d/entities.d stdx/d/lexer.d stdx/d/parser.d analysis/base.d analysis/del.d analysis/enumarrayliteral.d analysis/fish.d analysis/numbers.d analysis/objectconst.d analysis/package.d analysis/pokemon.d analysis/run.d analysis/style.d -ofdscanner -g -O -release -noboundscheck -inline
|
||||
|
|
Loading…
Reference in New Issue