Skip to content

Commit

Permalink
Merge pull request sorbet#136 from stripe-internal/pt-KeepEmptyLinesA…
Browse files Browse the repository at this point in the history
…tTheStartOfBlocks

KeepEmptyLinesAtTheStartOfBlocks: false
  • Loading branch information
nelhage-stripe authored and GitHub Enterprise committed Nov 6, 2017
2 parents 2683b0f + 1bd5c7a commit 0fc49c9
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
Expand Down
1 change: 0 additions & 1 deletion ast/Context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,6 @@ NameRef GlobalState::enterNameUTF8(UTF8Desc nm) {
swap(*(strings.end() - 1), *(strings.end() - 2));
}
} else {

if (strings_last_page_used + nm.to > GlobalState::STRINGS_PAGE_SIZE) {
strings.push_back(make_unique<vector<char>>(GlobalState::STRINGS_PAGE_SIZE));
// printf("Wasted %i space\n", STRINGS_PAGE_SIZE - strings_last_page_used);
Expand Down
1 change: 0 additions & 1 deletion ast/TreeMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ template <class FUNC> class TreeMap {
if (what == nullptr || dynamic_cast<EmptyTree *>(what) != nullptr || dynamic_cast<Nil *>(what) != nullptr)
return what;
if (ClassDef *v = dynamic_cast<ClassDef *>(what)) {

if (HAS_MEMBER_preTransformClassDef<FUNC>::value) {
v = PostPonePreTransform_ClassDef<FUNC, HAS_MEMBER_preTransformClassDef<FUNC>::value>::call(ctx, v,
func);
Expand Down
1 change: 0 additions & 1 deletion ast/Trees.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ void printArgs(GlobalState &gs, stringstream &buf, vector<unique_ptr<Expression>
}

string ConstDef::toString(GlobalState &gs, int tabs) {

return "constdef " + this->symbol.info(gs, true).name.name(gs).toString(gs) + " = " +
this->rhs->toString(gs, tabs + 1);
}
Expand Down
1 change: 0 additions & 1 deletion ast/Trees.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ class InsSeq : public Expression {
};

class EmptyTree : public Expression {

virtual std::string toString(GlobalState &gs, int tabs = 0);
virtual std::string showRaw(GlobalState &gs, int tabs = 0);
virtual std::string nodeName();
Expand Down
2 changes: 0 additions & 2 deletions ast/Types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ shared_ptr<ruby_typer::ast::Type> ruby_typer::ast::Types::glb(ast::Context ctx,
}

bool isSubTypeGround(ast::Context ctx, shared_ptr<Type> &t1, shared_ptr<Type> &t2) {

auto *g1 = dynamic_cast<GroundType *>(t1.get());
auto *g2 = dynamic_cast<GroundType *>(t2.get());

Expand Down Expand Up @@ -407,7 +406,6 @@ shared_ptr<Type> OrType::getCallArgumentType(ast::Context ctx, ast::NameRef name

shared_ptr<Type> AndType::dispatchCall(ast::Context ctx, ast::NameRef name, ast::Loc callLoc,
vector<TypeAndOrigins> &args, shared_ptr<Type> fullType) {

Error::notImplemented();
}

Expand Down
1 change: 0 additions & 1 deletion common/os/linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ using namespace std;
string exec(string cmd);

string addr2line(const string program_name, void const *const *addr, int count) {

auto addr2line_cmd = strprintf("atos -o %.256s", program_name.c_str());
for (int i = 3; i < count; ++i) {
addr2line_cmd = strprintf("%s %p", addr2line_cmd.c_str(), addr[i]);
Expand Down
1 change: 0 additions & 1 deletion common/os/mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ using namespace std;
string exec(string cmd);

string addr2line(const string program_name, void const *const *addr, int count) {

auto addr2line_cmd = strprintf("atos -o %.256s", program_name.c_str());
for (int i = 3; i < count; ++i) {
addr2line_cmd = strprintf("%s %p", addr2line_cmd.c_str(), addr[i]);
Expand Down
1 change: 0 additions & 1 deletion common/typecase.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ template <typename Base> void typecase(Base *b) {

template <typename Base, typename FirstSubclass, typename... RestOfSubclasses>
void typecase(Base *base, FirstSubclass &&first, RestOfSubclasses &&... rest) {

using Signature = get_signature<FirstSubclass>;
using Function = std::function<Signature>;

Expand Down
1 change: 0 additions & 1 deletion main/realmain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ int realmain(int argc, char **argv) {
st.bytes += src.size();
parse_and_print(gs, options, "-e", src, prints);
} else {

for (auto &fileName : files) {
console->debug("Parsing {}...", fileName);
string src;
Expand Down
1 change: 0 additions & 1 deletion test/test_corpus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ vector<Expectations> listDir(const char *name) {
}

while ((entry = readdir(dir)) != NULL) {

if (entry->d_type == DT_DIR) {
if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
continue;
Expand Down

0 comments on commit 0fc49c9

Please sign in to comment.