From 451be80c5a5e01aece8548f3b28fcf0851d0be23 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Fri, 31 Jan 2014 12:46:00 -0800 Subject: [PATCH 1/3] Update numbers.d Fixed copy/pasted doc comment. --- analysis/numbers.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analysis/numbers.d b/analysis/numbers.d index 2a75017..bd8d729 100644 --- a/analysis/numbers.d +++ b/analysis/numbers.d @@ -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 { From a39b492e216bc6f22dab25dd6e362bb0939ab139 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Fri, 31 Jan 2014 13:07:50 -0800 Subject: [PATCH 2/3] Update numbers.d Fix #91. 2.064.2 does not have opCast(bool) defined in Captures, so check the result of empty(). --- analysis/numbers.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analysis/numbers.d b/analysis/numbers.d index bd8d729..32637b7 100644 --- a/analysis/numbers.d +++ b/analysis/numbers.d @@ -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"); From f1e236d808e2ecfe6cd33c41cd77fd44f500b57d Mon Sep 17 00:00:00 2001 From: Casper Faergemand Date: Fri, 31 Jan 2014 22:30:35 +0100 Subject: [PATCH 3/3] Fixed Windows build.bat not working. --- build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.bat b/build.bat index cdde7bd..4e24b5d 100644 --- a/build.bat +++ b/build.bat @@ -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