srctree

Robin Linden parent fbb88413 00d04fd8
meta: Enable clang-tidy's concurrency-* checks

inlinesplit
.clang-tidy added: 18, removed: 5, total 13
@@ -46,6 +46,7 @@
Checks: >
bugprone-*,
cert-*,
concurrency-*,
cppcoreguidelines-pro-type-cstyle-cast,
cppcoreguidelines-pro-type-member-init,
google-*,
 
browser/gui/app.cpp added: 18, removed: 5, total 13
@@ -132,6 +132,8 @@ App::App(std::string browser_title, std::string start_page_hint, bool load_start
std::abort();
}
 
// This is okay as long as we don't call e.g. setenv(), unsetenv(), or putenv().
// NOLINTNEXTLINE(concurrency-mt-unsafe)
if (std::getenv("HST_DISABLE_DISK_IO")) {
// TODO(robinlinden): Support for things like HST_DISABLE_DISK_IO=0 to
// re-enable IO.
 
os/linux.cpp added: 18, removed: 5, total 13
@@ -13,6 +13,9 @@ using namespace std::literals;
 
namespace os {
 
// This is okay as long as we don't call e.g. setenv(), unsetenv(), or putenv().
// NOLINTBEGIN(concurrency-mt-unsafe)
 
std::vector<std::string> font_paths() {
std::vector<std::string> paths{};
if (char const *xdg_data_home = std::getenv("XDG_DATA_HOME")) {
@@ -46,4 +49,6 @@ unsigned active_window_scale_factor() {
return 1;
}
 
// NOLINTEND(concurrency-mt-unsafe)
 
} // namespace os
 
os/linux_test.cpp added: 18, removed: 5, total 13
@@ -19,6 +19,8 @@
 
using etest::expect_eq;
 
// NOLINTBEGIN(concurrency-mt-unsafe): No threads here.
 
int main() {
// Ensure that the system's environment doesn't affect the test result.
unsetenv("HST_SCALE");
@@ -45,3 +47,5 @@ int main() {
 
return etest::run_all_tests();
}
 
// NOLINTEND(concurrency-mt-unsafe)
 
url/url.cpp added: 18, removed: 5, total 13
@@ -125,6 +125,7 @@ void icu_init() {
return;
}
 
// NOLINTNEXTLINE(concurrency-mt-unsafe): This is going away soon.
char *data = std::getenv("HASTUR_ICU_DATA");
 
if (data != nullptr) {