Skip to content
2 changes: 1 addition & 1 deletion src/analysis/base.d
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public:

protected:

bool inAggregate = false;
bool inAggregate;
Copy link
Contributor

@skl131313 skl131313 Jun 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a tab here instead of spaces, even before the change. Might be a good idea to setup some code guidelines and checks for them, not sure if there were any before.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure there's one. @Hackerpilot uses tabs on his stuff. Excepted libdparse because it was planned to be included in phobos.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .editorconfig file for this project does specify tabs.

bool skipTests;

template visitTemplate(T)
Expand Down
12 changes: 6 additions & 6 deletions src/analysis/duplicate_attribute.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class DuplicateAttributeCheck : BaseAnalyzer

void checkAttributes(const Declaration node)
{
bool hasProperty = false;
bool hasSafe = false;
bool hasTrusted = false;
bool hasSystem = false;
bool hasPure = false;
bool hasNoThrow = false;
bool hasProperty;
bool hasSafe;
bool hasTrusted;
bool hasSystem;
bool hasPure;
bool hasNoThrow;

// Check the attributes
foreach (attribute; node.attributes)
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/enumarrayliteral.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EnumArrayLiteralCheck : BaseAnalyzer
super(fileName, sc, skipTests);
}

bool looking = false;
bool looking;

mixin visitTemplate!ClassDeclaration;
mixin visitTemplate!InterfaceDeclaration;
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/function_attributes.d
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class FunctionAttributeCheck : BaseAnalyzer
{
if (dec.parameters.parameters.length == 0)
{
bool foundConst = false;
bool foundProperty = false;
bool foundConst;
bool foundProperty;
foreach (attribute; dec.attributes)
foundConst = foundConst || attribute.attribute.type == tok!"const"
|| attribute.attribute.type == tok!"immutable"
Expand Down
1 change: 0 additions & 1 deletion src/analysis/line_length.d
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ private:
size_t length;
const newLine = tok.line > prevLine;
bool multiLine;

if (tok.text is null)
length += str(tok.type).length;
else
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/objectconst.d
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ObjectConstCheck : BaseAnalyzer
|| name == "toString" || name == "opCast";
}

private bool looking = false;
private bool looking;

}

Expand Down
6 changes: 3 additions & 3 deletions src/analysis/opequals_without_tohash.d
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class OpEqualsWithoutToHashCheck : BaseAnalyzer

private void actualCheck(const Token name, const StructBody structBody)
{
bool hasOpEquals = false;
bool hasToHash = false;
bool hasOpCmp = false;
bool hasOpEquals;
bool hasToHash;
bool hasOpCmp;

// Just return if missing children
if (!structBody || !structBody.declarations || name is Token.init)
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/run.d
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void generateReport(string[] fileNames, const StaticAnalysisConfig config,
bool analyze(string[] fileNames, const StaticAnalysisConfig config,
ref StringCache cache, ref ModuleCache moduleCache, bool staticAnalyze = true)
{
bool hasErrors = false;
bool hasErrors;
foreach (fileName; fileNames)
{
auto code = readFile(fileName);
Expand Down
8 changes: 4 additions & 4 deletions src/analysis/undocumented.d
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class UndocumentedDeclarationCheck : BaseAnalyzer
immutable bool prevOverride = getOverride();
immutable bool prevDisabled = getDisabled();
immutable bool prevDeprecated = getDeprecated();
bool dis = false;
bool dep = false;
bool ovr = false;
bool pushed = false;
bool dis;
bool dep;
bool ovr;
bool pushed;
foreach (attribute; dec.attributes)
{
if (isProtection(attribute.attribute.type))
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/unmodified.d
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ private:
castExpression.accept(this);
}

bool foundCast = false;
bool foundCast;
}

if (initializer is null)
Expand Down
Loading