History log of /openbmc/dbus-sensors/.clang-tidy (Results 1 – 22 of 22)
Revision Date Author Comments
# 72bd2735 31-Aug-2024 George Liu <liuxiwei@ieisystem.com>

clang-tidy: Remove redundant configuration

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: Iccd1ec53f1f3e0e05291b6810b5ee644121714c3


# b1e74cd3 03-Apr-2024 Ed Tanous <ed@tanous.net>

Add new tidy checks

Change-Id: Ibe7eb340603a6c5228997d314c20fe872e91fe58
Signed-off-by: Ed Tanous <ed@tanous.net>


# eacbfdd1 04-Apr-2024 Ed Tanous <ed@tanous.net>

Enable misc-include-cleaner

Change-Id: I22099a0f95b2eb884dec7d95cee0bdd0c159fd1f
Signed-off-by: Ed Tanous <ed@tanous.net>


# 9142343b 04-Apr-2024 Ed Tanous <ed@tanous.net>

Enable cppcoreguidelines-rvalue-reference-param-not-moved

and fix the one failure.

Change-Id: I62ddb9e3520b4f16331f605441740da5831ade51
Signed-off-by: Ed Tanous <ed@tanous.net>


# de366c82 03-Apr-2024 Ed Tanous <ed@tanous.net>

Enable readability-container-data-pointer

Clang tidy check, and fix the one case.

Change-Id: I0935eb6403fd3b2e1a66d9e097febd292f61d70d
Signed-off-by: Ed Tanous <ed@tanous.net>


# b0745286 03-Apr-2024 Ed Tanous <ed@tanous.net>

Add bugprone-optional-value-conversion

And fix the one case.

Change-Id: Iaaedf56b12cae38583ae82017ebea8bfe8987689
Signed-off-by: Ed Tanous <ed@tanous.net>


# f3fd5248 03-Apr-2024 Ed Tanous <ed@tanous.net>

Enable bugprone-unused-local-non-trivial-variable

And fix the two problems.

Change-Id: Ib91625d66e42fe8b14aaf1ef33761f9084564de9
Signed-off-by: Ed Tanous <ed@tanous.net>


# 72b39116 03-Apr-2024 Ed Tanous <ed@tanous.net>

Enable bugprone-assignment-in-if-condition

And fix the one violation.

Change-Id: I8b844d0e987827527c82e3351efd40c1bfd692db
Signed-off-by: Ed Tanous <ed@tanous.net>


# 201a1015 03-Apr-2024 Ed Tanous <ed@tanous.net>

Add modernize-redundant-void-arg

Enable this check and fix the failures.

Change-Id: I89b13daf1161be40564367562bb9c8c0c459e1d0
Signed-off-by: Ed Tanous <ed@tanous.net>


# 77141acb 14-Mar-2023 Oleksandr Shulzhenko <oleksandr.shulzhenko.viktorovych@intel.com>

IntelCPUSensor: Use libpeci when communicating via peci-legacy

When using peci-legacy the general approach is to use libpeci as
the middleware to communicate with peci core from userspace.
Integrate

IntelCPUSensor: Use libpeci when communicating via peci-legacy

When using peci-legacy the general approach is to use libpeci as
the middleware to communicate with peci core from userspace.
Integrate libpeci with IntelCPUSensor and use library functions to issue
peci commands where necessary.

Tested: hwmons are succesfully created in the same way
they were created using ioctl.

Change-Id: I4ecd70e604d447a4066dc5fb8d902992cb97cadf
Signed-off-by: Oleksandr Shulzhenko <oleksandr.shulzhenko.viktorovych@intel.com>

show more ...


# d02ad49e 08-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-tidy: reduce repo-specific flags

Adjust the clang-tidy settings so that it does not need to have
a bunch of values related to the libpeci subproject. In general
we should be ignoring any head

clang-tidy: reduce repo-specific flags

Adjust the clang-tidy settings so that it does not need to have
a bunch of values related to the libpeci subproject. In general
we should be ignoring any header files from any subprojects since
they are not under direct control of the repository-under-test.

Change-Id: I64d4e4bae20ca27aed68081b4270fa0ec8fc0543
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# bce0f038 09-Jul-2022 Ed Tanous <edtanous@google.com>

Update clang tidy with new checks

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I95ad08f3d380bfb3231355df9e11fc6865595fca


# 193105f1 09-Jul-2022 Ed Tanous <edtanous@google.com>

Alphabetize clang-tidy list

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1bbd9653e7833e55226ccf61916a369ee8963378


# 73030639 14-Jan-2022 Ed Tanous <edtanous@google.com>

Enable cppcoreguidelines-avoid-goto checks

We've been pretty good about this one, the only usages seem to be in
nvme sensor and added recently. To move to more RAII compliant
containers, this commi

Enable cppcoreguidelines-avoid-goto checks

We've been pretty good about this one, the only usages seem to be in
nvme sensor and added recently. To move to more RAII compliant
containers, this commit creates a FileHandle class, which accepts either
a file path and a mode, or a direct file handle, to be handled via RAII.
Ideally we wouldn't have to create this ourselves, and could rely on
some library, but the alternatives all have compromises that are worse.

boost::asio::random_access_file requires iouring to be enabled, and
isn't available until boost 0.78, which we haven't rebased to yet.
https://www.boost.org/doc/libs/develop/doc/html/boost_asio/reference/random_access_file.html
Once available, this is what I would hope that a bunch of the nvme stuff
evolves into to be much simpler.

boost::iostream::file_descriptor requires linking against
boost::iostream, which would bloat our binary size for a lot of things
we don't use. There is a file_descriptor.cpp that we could compile
directly to solve this, but the existing yocto boost project (nor any
other distro project) installs these files for use, which would
complicate this solution

std::fstream doesn't allow direct access to the file handle, which would
be required for streaming operations.

https://www.boost.org/doc/libs/1_35_0/libs/iostreams/doc/installation.html
https://www.boost.org/doc/libs/1_78_0/libs/iostreams/doc/classes/file_descriptor.html#file_descriptor

A very similar class exists within ipmid here:
https://github.com/openbmc/phosphor-host-ipmid/blob/master/user_channel/file.hpp

This class differs in a couple minor ways, in that it throws exceptions
on open failures (similar to the boost classes), accepts the input by
std::filesystem::path, instead of string, and supports std::move, which
is required for the pipe usage.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I8be2419783e41e8f529030bb3d05c2e7aa890307

show more ...


# 99c4409a 14-Jan-2022 Ed Tanous <edtanous@google.com>

Enable cppcoreguidelines-pro-type-vararg check

We only had one usage of printf in the code that was in violation of
this rule, so replace it with iostreams, and enable the check.

Signed-off-by: Ed

Enable cppcoreguidelines-pro-type-vararg check

We only had one usage of printf in the code that was in violation of
this rule, so replace it with iostreams, and enable the check.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie62165b599a996f34893aa5a3f8d1f6e6cbaf903

show more ...


# 74cffa88 25-Jan-2022 Ed Tanous <edtanous@google.com>

Fix clang-tidy header check

Apparently our exclusion of the linux headers covered up some issues in
our own headers, and was erroneously ignoring all headers, not just the
linux headers.

Apparently

Fix clang-tidy header check

Apparently our exclusion of the linux headers covered up some issues in
our own headers, and was erroneously ignoring all headers, not just the
linux headers.

Apparently this now detects recursion quite a bit, so disable that check
for the moment, as well as the special member variables checks. Also,
disable some cert checks that are duplicates of
bugprone-reserved-identifier, because of the aformentioned ignored linux
headers

All other changes are done automatically.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie640495146dbe155a85d8a9e81be78539137a88b

show more ...


# 65291360 14-Jan-2022 Ed Tanous <edtanous@google.com>

Enable cppcoreguidelines-special-member-functions check

We only had one violation of this, which was in a test case, so fix that
test case, and enable this check.

Signed-off-by: Ed Tanous <edtanous

Enable cppcoreguidelines-special-member-functions check

We only had one violation of this, which was in a test case, so fix that
test case, and enable this check.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1288a6d51593bb6d4c3a73dabaa566bf29474b5e

show more ...


# 532c8649 14-Jan-2022 Ed Tanous <edtanous@google.com>

Enable cppcoreguidelines-avoid-c-arrays

We only had one pretty trivial use of a C array in dbus-sensors.
Replace that with std::array, and enable the checks.

Signed-off-by: Ed Tanous <edtanous@goog

Enable cppcoreguidelines-avoid-c-arrays

We only had one pretty trivial use of a C array in dbus-sensors.
Replace that with std::array, and enable the checks.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5ecbfa07a7f46977dc3ccbde3c4b385e95b6a730

show more ...


# a771f6a7 14-Jan-2022 Ed Tanous <edtanous@google.com>

Enable cppcoreguidelines-init-variables

We try to enforce this rule, but clearly the robot can do a better job.
Enable the rule, and for init of all variables that clang-tidy finds in
error.

Signed

Enable cppcoreguidelines-init-variables

We try to enforce this rule, but clearly the robot can do a better job.
Enable the rule, and for init of all variables that clang-tidy finds in
error.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Icf64bc51b3180de29f7e92fa5c5f636e6b1462a6

show more ...


# a25223c2 13-Jan-2022 Ed Tanous <edtanous@google.com>

Alphabetize clang-tidy

Tested: Ran clang tidy (in ci). No-op change.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I358445a85991542690e9914a88ff7806f5d74154


# 5ab424a6 02-Sep-2021 Ed Tanous <edtanous@google.com>

clang-tidy disable bugprone-narrowing-conversions

clang-tidy-13 adds this check, which we had in our config file.
dbus-sensors at this time doesn't even come close to passing this check,

clang-tidy disable bugprone-narrowing-conversions

clang-tidy-13 adds this check, which we had in our config file.
dbus-sensors at this time doesn't even come close to passing this check,
so for the moment, remove it, with the intent of adding it back at some
point once we can get all the narrowing conversion warnings squashed.

Tested:
Code now passes clang-tidy-13 checks

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I098922f9c950d2f568c94c9709770a5cbabdd094

show more ...


# 8a57ec09 09-Oct-2020 Ed Tanous <ed@tanous.net>

add clang-tidy

This commit implements a clang-tidy file, and makes some changes to get
it to pass. Most changes are naming or mechanical in nature.

Tested:
Clang-tidy now p

add clang-tidy

This commit implements a clang-tidy file, and makes some changes to get
it to pass. Most changes are naming or mechanical in nature.

Tested:
Clang-tidy now passes.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ia441e4801b6c8725421d160c531c5df141f255d4

show more ...