1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

uncrustify formatting

This commit is contained in:
Ben Burdette 2020-04-29 10:14:32 -06:00
parent 22e6490311
commit e2f61263eb
6 changed files with 3050 additions and 62 deletions

View file

@ -29,38 +29,38 @@ int main()
ErrorInfo { .level = lvlInfo,
.name = "Info name",
.description = "Info description",
});
});
logger->logEI(
ErrorInfo { .level = lvlTalkative,
.name = "Talkative name",
.description = "Talkative description",
});
});
logger->logEI(
ErrorInfo { .level = lvlChatty,
.name = "Chatty name",
.description = "Chatty description",
});
});
logger->logEI(
ErrorInfo { .level = lvlDebug,
.name = "Debug name",
.description = "Debug description",
});
});
logger->logEI(
ErrorInfo { .level = lvlVomit,
.name = "Vomit name",
.description = "Vomit description",
});
});
// Error in a program; no hint and no nix code.
logError(
ErrorInfo { .name = "name",
.description = "error description",
});
});
// Warning with name, description, and hint.
// The hintfmt function makes all the substituted text yellow.
@ -68,7 +68,7 @@ int main()
ErrorInfo { .name = "name",
.description = "error description",
.hint = hintfmt("there was a %1%", "warning"),
});
});
// Warning with nix file, line number, column, and the lines of
@ -80,28 +80,28 @@ int main()
ErrorInfo { .name = "warning name",
.description = "warning description",
.hint = hintfmt("this hint has %1% templated %2%!!",
"yellow",
"values"),
"yellow",
"values"),
.nixCode = NixCode {
.errPos = Pos(problem_file, 40, 13),
.prevLineOfCode = std::nullopt,
.errLineOfCode = "this is the problem line of code",
.nextLineOfCode = std::nullopt
}});
}});
// Error with previous and next lines of code.
logError(
ErrorInfo { .name = "error name",
.description = "error description",
.hint = hintfmt("this hint has %1% templated %2%!!",
"yellow",
"values"),
"yellow",
"values"),
.nixCode = NixCode {
.errPos = Pos(problem_file, 40, 13),
.prevLineOfCode = std::optional("previous line of code"),
.errLineOfCode = "this is the problem line of code",
.nextLineOfCode = std::optional("next line of code"),
}});
}});
return 0;