Skip to content

Commit

Permalink
Merge pull request dlang#4324 from wilzbach/extend_whitespace_list
Browse files Browse the repository at this point in the history
enforce: whitespace after catch
  • Loading branch information
Hackerpilot committed May 17, 2016
2 parents 1d6d8f0 + 484f7bf commit 1565a32
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 125 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ install:
script:
- (cd .. && rdmd ./checkwhitespace.d $(find phobos -name '*.d'))
# enforce whitespace between statements
- grep -E "(for|foreach|foreach_reverse|if|while)\(" $(find . -name '*.d'); test $? -eq 1
- grep -E "(for|foreach|foreach_reverse|if|while|switch|catch)\(" $(find . -name '*.d'); test $? -eq 1
# at the moment libdparse has problems to parse some modules (->excludes)
- ./dsc --config .dscanner.ini --styleCheck $(find etc std -type f -name '*.d' | grep -vE 'std/traits.d|std/typecons.d|std/conv.d') -I.
2 changes: 1 addition & 1 deletion std/container/rbtree.d
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ assert(equal(rbt[], [5]));
{
recurse(_end.left, "");
}
catch(Exception e)
catch (Exception e)
{
debug printTree(_end.left, 0);
throw e;
Expand Down
4 changes: 2 additions & 2 deletions std/conv.d
Original file line number Diff line number Diff line change
Expand Up @@ -2215,15 +2215,15 @@ Lerr:
int x = input.to!int();
assert(false, "Invalid conversion did not throw");
}
catch(ConvException e)
catch (ConvException e)
{
// Ensure error message contains failing character, not the character
// beyond.
import std.algorithm.searching : canFind;
assert( e.msg.canFind(charInMsg) &&
!e.msg.canFind(charNotInMsg));
}
catch(Exception e)
catch (Exception e)
{
assert(false, "Did not throw ConvException");
}
Expand Down
14 changes: 7 additions & 7 deletions std/csv.d
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ unittest
csvReader(str, ["c","b"]);
assert(0);
}
catch(HeaderMismatchException e)
catch (HeaderMismatchException e)
{
assert(e.col == 2);
}
Expand Down Expand Up @@ -1041,7 +1041,7 @@ public:
aa[header[_input.col-1]] = recordRange.front;
}
}
catch(ConvException e)
catch (ConvException e)
{
throw new CSVException(e.msg, _input.row, _input.col, e);
}
Expand Down Expand Up @@ -1086,7 +1086,7 @@ public:
recordRange.popFront();
}
}
catch(ConvException e)
catch (ConvException e)
{
throw new CSVException(e.msg, _input.row, colIndex, e);
}
Expand Down Expand Up @@ -1280,14 +1280,14 @@ public:
try
csvNextToken!(Range, ErrorLevel, Separator)
(_input.range, _front, _separator, _quote,false);
catch(IncompleteCellException ice)
catch (IncompleteCellException ice)
{
ice.row = _input.row;
ice.col = _input.col;
ice.partialData = _front.data.idup;
throw ice;
}
catch(ConvException e)
catch (ConvException e)
{
throw new CSVException(e.msg, _input.row, _input.col, e);
}
Expand All @@ -1302,7 +1302,7 @@ public:
csvNextToken!(Range, ErrorLevel, Separator)
(_input.range, _front, _separator, _quote,false);
}
catch(IncompleteCellException ice)
catch (IncompleteCellException ice)
{
ice.row = _input.row;
ice.col = _input.col;
Expand All @@ -1327,7 +1327,7 @@ public:
auto data = _front.data;
static if (!isSomeString!Contents) skipWS(data);
try curContentsoken = to!Contents(data);
catch(ConvException e)
catch (ConvException e)
{
throw new CSVException(e.msg, _input.row, _input.col, e);
}
Expand Down
Loading

0 comments on commit 1565a32

Please sign in to comment.