#
d63c72ea |
| 06-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Enable clang-tidy checks we already pass
clang-13 brought some additional checks we can turn on that we already pass, so enable them. List of checks can be found in the diff, and includes the suspi
Enable clang-tidy checks we already pass
clang-13 brought some additional checks we can turn on that we already pass, so enable them. List of checks can be found in the diff, and includes the suspicious includes check, which we previously had to disable due to a clang bug.
Tested: Code compiles, clang-tidy passes
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I1a4d1da0a8e775cdeb6b898bc1cdb0f3f7b6f06a
show more ...
|
#
6de264cc |
| 06-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Enable bugprone widening checks in clang
Most of the errors we hit are simply places we need to explicitly increase the width of the integer. Luckily, these are few and far between.
Tested: Code c
Enable bugprone widening checks in clang
Most of the errors we hit are simply places we need to explicitly increase the width of the integer. Luckily, these are few and far between.
Tested: Code compiles, unit tests pass.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I617d87f3970ae773e0767bb2f20118fca2e71daa
show more ...
|
#
24b2fe81 |
| 06-Jan-2022 |
Ed Tanous <edtanous@google.com> |
enable bugprone exception escape check
clang-13 includes new checks, and finds some issues. The first is that the boost::vector constructor can possibly throw, so replace the underlying flat_map co
enable bugprone exception escape check
clang-13 includes new checks, and finds some issues. The first is that the boost::vector constructor can possibly throw, so replace the underlying flat_map container with std::vector instead.
The others are places where we could possibly throw in destructors, which would be bad. Ideally we wouldn't use the destructor pattern, but that would be non-trivial to clean up at this point, so just catch the exception, and log it. At the same time, catch exceptions thrown to main and log them.
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I77b86eaa2fc79e43d1ca044c78ca3b0ce0a7c38c
show more ...
|
#
f94c4ecf |
| 06-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Enable clang-tidy forward reference checks
Clang-13 adds new checks we can turn on, which find quite a few errors.
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I
Enable clang-tidy forward reference checks
Clang-13 adds new checks we can turn on, which find quite a few errors.
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I74b780760014c898cc440b37aea640b33e91c439
show more ...
|
#
b00dcc27 |
| 23-Feb-2021 |
Ed Tanous <edtanous@google.com> |
Fix the build on clang-11
Clang tidy 11 got some really neat checks that do a much better job. Unfortunately, this, combined with the change in how std::executors has defined how callbacks should wo
Fix the build on clang-11
Clang tidy 11 got some really neat checks that do a much better job. Unfortunately, this, combined with the change in how std::executors has defined how callbacks should work differently in the past, which we picked up in 1.73, and now in theory we have recursion in a bunch of our IO loops that we have to break manually. In practice, this is unlikely to matter, as there's almost a 0% chance that we go through N thousand requests without ever starving the IO buffer.
Other changes to make this build include: 1. Adding inline on the appropriate places where declared in a header. 2. Removing an Openssl call that did nothing, as the result was immediately overwritten. 3. Declaring the subproject dependencies as system dependencies, which silences the clang-tidy checks for those projects.
Tested: Code builds again, clang-tidy passes
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic11b1002408e8ac19a17a955e9477cac6e0d7504
show more ...
|
#
81ce609e |
| 17-Dec-2020 |
Ed Tanous <ed@tanous.net> |
Fix .clang-tidy
camelLower is not a type, camelBack is.
Changes were made automatically with clang-tidy --fix-errors
To be able to apply changes automatically, the only way I've found that works w
Fix .clang-tidy
camelLower is not a type, camelBack is.
Changes were made automatically with clang-tidy --fix-errors
To be able to apply changes automatically, the only way I've found that works was to build the version of clang/clang-tidy that yocto has, and run the fix script within bitbake -c devshell bmcweb. Unfortunately, yocto has clang-tidy 11, which can apparently find a couple extra errors in tests we already had enabled. As such, a couple of those are also included.
Tested: Ran clang-tidy-11 and got a clean result.
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I9d1080b67f0342229c2f267160849445c065ca51
show more ...
|
#
52599638 |
| 27-Oct-2020 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
clang-tidy: fix typo
The Checks string isn't terminated with a single quote, so clang doesn't work. Add the missing quote.
Tested: nope Change-Id: Ic45fa8f2ccd1399cb9748196d16e211282cea2b0 Signed-
clang-tidy: fix typo
The Checks string isn't terminated with a single quote, so clang doesn't work. Add the missing quote.
Tested: nope Change-Id: Ic45fa8f2ccd1399cb9748196d16e211282cea2b0 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
#
f23b7296 |
| 15-Oct-2020 |
Ed Tanous <ed@tanous.net> |
Turn on ALL perf checks
1st, alphabetize the tidy-list for good housekeeping.
Next, enable all the clang-tidy performance checks, and resolve all the issues. most of the issues boil down to: 1. Us
Turn on ALL perf checks
1st, alphabetize the tidy-list for good housekeeping.
Next, enable all the clang-tidy performance checks, and resolve all the issues. most of the issues boil down to: 1. Using std::move on const variables. This does nothing. 2. Passing big variables (like std::string) by value. 3. Using double quotes on a find call, which constructs an intermediate string, rather than using the character overload.
Tested Loaded on system, logged in successfully and pulled down webui-vue. No new errors.
Walked the Redfish tree a bit, and observed no new problems.
Ran redfish service validator. Got no new failures (although there are a lot of log service deprecation warnings that we should look at).
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I2238958c4b22c1e554e09a0a1787c744bdbca43e
show more ...
|
#
3174e4df |
| 07-Oct-2020 |
Ed Tanous <ed@tanous.net> |
Write the clang-tidy file OpenBMC needs
Now that CI can handle clang-tidy, and a lot of the individual fixes have landed for the various static analysis checks, lets see how close we are.
This incl
Write the clang-tidy file OpenBMC needs
Now that CI can handle clang-tidy, and a lot of the individual fixes have landed for the various static analysis checks, lets see how close we are.
This includes bringing a bunch of the code up to par with the checks that require. Most of them fall into the category of extraneous else statements, const correctness problems, or extra copies.
Tested: CI only. Unit tests pass.
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I9fbd346560a75fdd3901fa40c57932486275e912
show more ...
|
#
b0bb6f25 |
| 28-Sep-2020 |
Ed Tanous <ed@tanous.net> |
Check in clang-tidy file for variable naming
Tested: ran clang-tidy on bmcweb codebase per instructions in previous commit, and resolved errors it found.
Change-Id: I5cffb6e6e98517cee3bb366e8ab34dd
Check in clang-tidy file for variable naming
Tested: ran clang-tidy on bmcweb codebase per instructions in previous commit, and resolved errors it found.
Change-Id: I5cffb6e6e98517cee3bb366e8ab34dd8d6419782 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
55c7b7a2 |
| 22-May-2018 |
Ed Tanous <ed.tanous@intel.com> |
Move over to upstream c++ style
This patchset moves bmcweb over to the upstream style naming conventions for variables, classes, and functions, as well as imposes the latest clang-format file.
This
Move over to upstream c++ style
This patchset moves bmcweb over to the upstream style naming conventions for variables, classes, and functions, as well as imposes the latest clang-format file.
This changeset was mostly built automatically by the included .clang-tidy file, which has the ability to autoformat and auto rename variables. At some point in the future I would like to see this in greater use, but for now, we will impose it on bmcweb, and see how it goes.
Tested: Code still compiles, and appears to run, although other issues are possible and likely.
Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
show more ...
|
#
911ac317 |
| 15-Aug-2017 |
Ed Tanous <ed.tanous@intel.com> |
Large updates to webserver
Do not merge yet
Change-Id: I38c56844c1b0e3e8e5493c2705e62e6db7ee2102
|