drm_hwcomposer: CI: Tune clang-tidy coarse checks
1. Switch to "enable all then disable unwanted" strategy
2. Enable checks that causes small number of failes, marking
corresponding lines as NOLINT, so we won't introduce
new such cases unintentionally.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/drm/DrmDevice.cpp b/drm/DrmDevice.cpp
index 0f5f581..35ed45d 100644
--- a/drm/DrmDevice.cpp
+++ b/drm/DrmDevice.cpp
@@ -116,10 +116,12 @@
mDrmFbImporter = std::make_unique<DrmFbImporter>(self);
}
+// NOLINTNEXTLINE (readability-function-cognitive-complexity): Fixme
std::tuple<int, int> DrmDevice::Init(const char *path, int num_displays) {
/* TODO: Use drmOpenControl here instead */
fd_ = UniqueFd(open(path, O_RDWR | O_CLOEXEC));
if (fd() < 0) {
+ // NOLINTNEXTLINE(concurrency-mt-unsafe): Fixme
ALOGE("Failed to open dri %s: %s", path, strerror(errno));
return std::make_tuple(-ENODEV, 0);
}
diff --git a/drm/UEventListener.cpp b/drm/UEventListener.cpp
index eae0608..470e89a 100644
--- a/drm/UEventListener.cpp
+++ b/drm/UEventListener.cpp
@@ -40,6 +40,7 @@
uevent_fd_ = UniqueFd(
socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT));
if (!uevent_fd_) {
+ // NOLINTNEXTLINE(concurrency-mt-unsafe): Fixme
ALOGE("Failed to open uevent socket: %s", strerror(errno));
return -errno;
}
@@ -51,6 +52,7 @@
int ret = bind(uevent_fd_.Get(), (struct sockaddr *)&addr, sizeof(addr));
if (ret) {
+ // NOLINTNEXTLINE(concurrency-mt-unsafe): Fixme
ALOGE("Failed to bind uevent socket: %s", strerror(errno));
return -errno;
}