9e104151 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-braces-around-statements check
This checks that bodies of if statements and loops (for, do while, and while) are inside braces.
Signed-off-by: George Liu <liuxiwei@ie
clang-tidy: Enable readability-braces-around-statements check
This checks that bodies of if statements and loops (for, do while, and while) are inside braces.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I9b79aaa3d3299d42ae245afe4b9488ae58e2c28d
show more ...
|
3d48751b | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-qualified-auto check
This check aims to improve code readability by suggesting the use of const auto * instead of auto for variables that are pointers or iterators. Th
clang-tidy: Enable readability-qualified-auto check
This check aims to improve code readability by suggesting the use of const auto * instead of auto for variables that are pointers or iterators. This helps clarify the const-ness of the pointed-to object or container elements.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ia132b6dd8ae4e3c16809326f6055396666abc95a
show more ...
|
349d22e3 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-simplify-boolean-expr check
This checks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly.
Si
clang-tidy: Enable readability-simplify-boolean-expr check
This checks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: If2316dc52cbd280971f0333ee805b11e1b99d27f
show more ...
|
49875a26 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-implicit-bool-conversion check
This check can be used to find implicit conversions between built-in types and booleans. the following conversion types are checked: - i
clang-tidy: Enable readability-implicit-bool-conversion check
This check can be used to find implicit conversions between built-in types and booleans. the following conversion types are checked: - integer expression/literal to boolean - floating expression/literal to boolean - pointer/pointer to member/nullptr/NULL to boolean - boolean expression/literal to integer - boolean expression/literal to floating
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I3f4bc8902e255d1c85ec57f47d9532ee7326a442
show more ...
|
80f51bbb | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-avoid-const-params-in-decls check
Checks whether a function declaration has parameters that are top level const. const values in declarations do not affect the signatu
clang-tidy: Enable readability-avoid-const-params-in-decls check
Checks whether a function declaration has parameters that are top level const. const values in declarations do not affect the signature of a function, so they should not be put there.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ic4c2fc0f4ce0ce03fd6621d1f8c928890cf5da88
show more ...
|
391bec5f | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-redundant-member-init check
Finds member initializations that are unnecessary because the same default constructor would be called if they were not present.
Signed-of
clang-tidy: Enable readability-redundant-member-init check
Finds member initializations that are unnecessary because the same default constructor would be called if they were not present.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ia112636b43360f6a4e14c0a7a80a2635754325c7
show more ...
|
16181d1d | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-static-accessed-through-instance check
Checks for member expressions that access static members through instances, and replaces them with uses of the appropriate quali
clang-tidy: Enable readability-static-accessed-through-instance check
Checks for member expressions that access static members through instances, and replaces them with uses of the appropriate qualified-id.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I24de8ac8897de839594c6c71319febd0209bbc2e
show more ...
|
f0592559 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made static because the functions don’t use this. This check also triggers
clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made static because the functions don’t use this. This check also triggers readability-static-accessed-through -instance check as we are trying to access a static member function through an instance.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I6efe76666f75fb4f65621796466d9347cea25d01
show more ...
|
15c6ec25 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-redundant-access-specifiers check
Finds classes, structs, and unions containing redundant member (field and method) access specifiers.
Signed-off-by: George Liu <liux
clang-tidy: Enable readability-redundant-access-specifiers check
Finds classes, structs, and unions containing redundant member (field and method) access specifiers.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I6ce8c84fbab98de5efd6a11804f9dc58afae5027
show more ...
|
405ea286 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-const-return-type check
Checks for functions with a const-qualified return type and recommends removal of the const keyword. Such use of const is usually superfluous,
clang-tidy: Enable readability-const-return-type check
Checks for functions with a const-qualified return type and recommends removal of the const keyword. Such use of const is usually superfluous, and can prevent valuable compiler optimizations. Does not (yet) fix trailing return types.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ifff7541c95d7881d8c6407b20c906ec7eb13abf1
show more ...
|
df3ab7c9 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable performance-move-const-arg check
The check warns: - if std::move() is called with a constant argument. - if std::move() is called with an argument of a trivially-copyable type.
clang-tidy: Enable performance-move-const-arg check
The check warns: - if std::move() is called with a constant argument. - if std::move() is called with an argument of a trivially-copyable type. - if the result of std::move() is passed as a const reference argument.
In all three cases, the check will suggest a fix that removes the std::move().
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ibaf1050b39bbcaddd27473c6f2009adbfb96125f
show more ...
|
112821cf | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable performance-for-range-copy check
The check is only applied to loop variables of types that are expensive to copy which means they are not trivially copyable or have a non-trivial
clang-tidy: Enable performance-for-range-copy check
The check is only applied to loop variables of types that are expensive to copy which means they are not trivially copyable or have a non-trivial copy constructor or destructor.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I9643e396c6bd95bb9bef9037f018fbaf20d506d7
show more ...
|
aaa667f2 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable modernize-use-nullptr check
This check converts the usage of null pointer constants (e.g. NULL, 0) to use the new C++11 and C23 nullptr keyword.
Signed-off-by: George Liu <liuxiw
clang-tidy: Enable modernize-use-nullptr check
This check converts the usage of null pointer constants (e.g. NULL, 0) to use the new C++11 and C23 nullptr keyword.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I10dccfd0513385c583ca07d13ed71edb04b58853
show more ...
|
c8ddde64 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable modernize-use-override check
This check adds override (introduced in C++11) to overridden virtual functions and removes virtual from those functions as it is not required.
Signed
clang-tidy: Enable modernize-use-override check
This check adds override (introduced in C++11) to overridden virtual functions and removes virtual from those functions as it is not required.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I7ce6bf641dabf4d325a29a1b641e58beac6885bd
show more ...
|
fcf08106 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable modernize-use-emplace check
The check flags insertions to an STL-style container done by calling the push_back, push, or push_front methods with an explicitly-constructed temporar
clang-tidy: Enable modernize-use-emplace check
The check flags insertions to an STL-style container done by calling the push_back, push, or push_front methods with an explicitly-constructed temporary of the container element type. In this case, the corresponding emplace equivalent methods result in less verbose and potentially more efficient code.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I540c22d3d26195a9d1ead57a4322541951c9ff53
show more ...
|
226059b8 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable modernize-avoid-bind check
The check finds uses of std::bind and boost::bind and replaces them with lambdas.
Lambdas will use value-capture unless reference capture is explicitly
clang-tidy: Enable modernize-avoid-bind check
The check finds uses of std::bind and boost::bind and replaces them with lambdas.
Lambdas will use value-capture unless reference capture is explicitly requested with std::ref or boost::ref.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I4491650a46eaab1588474b26efc622e89232ef02
show more ...
|
173dc323 | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Add cert checks
This check corresponds to the CERT C++ Coding Standard rule.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ie31974d318a7b11a0295455595d7c330676ef45a |
8f538d9c | 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
Add clang-tidy to phosphor-led-manager
This commit enables clang-tidy and adds few tidy checks.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I3a7b41545fef4c726b56aeab3e4b4000dfcac3
Add clang-tidy to phosphor-led-manager
This commit enables clang-tidy and adds few tidy checks.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I3a7b41545fef4c726b56aeab3e4b4000dfcac32f
show more ...
|
c0f7a8b4 | 23-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
manager: include config-validator.hpp always
There was an issue with
phosphor::led::validateConfigV1(systemLedMap);
being not included when using meson option
use-json
as false (yaml config), si
manager: include config-validator.hpp always
There was an issue with
phosphor::led::validateConfigV1(systemLedMap);
being not included when using meson option
use-json
as false (yaml config), since it was transitively included by manager/json-parser.hpp
Directly including it should fix the issue.
Change-Id: I056cd524ff255e4409844f74bd7755ab5ee857d6 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
638d1487 | 21-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
config: error on invalid configuration
Since the default led priority is no longer 'Blink', the priority now has to be explicitly defined when using either group priority or led priority.
If a conf
config: error on invalid configuration
Since the default led priority is no longer 'Blink', the priority now has to be explicitly defined when using either group priority or led priority.
If a configuration does not define the priority, the configuration is invalid and in the yaml case, phosphor-led-manager should fail to build, in the json case, the process should exit due to the configuration error.
The config validation has been extracted into it's own file and made separate from json config parsing.
So every config will go through the same validation even if its been created via yaml.
Change-Id: Ifda65942b0768d6c0d3b25076f7a1236b46b3d9f Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
4d44a55e | 24-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
config: allow led priority to be Off
This makes the configuration more flexible and eliminates the edge case.
I don't see why this should not be possible.
Change-Id: I28e33535539b3214e18d781631465
config: allow led priority to be Off
This makes the configuration more flexible and eliminates the edge case.
I don't see why this should not be possible.
Change-Id: I28e33535539b3214e18d7816314656df5d3c370e Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
55badf79 | 24-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
manager: led priority is optional
The default priority was "Blink" but now the priority is optional.
This helps to implement group priority. So if someone wants to use group priority they can do so
manager: led priority is optional
The default priority was "Blink" but now the priority is optional.
This helps to implement group priority. So if someone wants to use group priority they can do so, without the default led priority getting in the way.
The led priority can still be assigned as "Blink" explicitly if needed.
Change-Id: I9336487bcc2edc0b3308ee76eb5330b8222b7f25 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
7ba70c82 | 23-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
config: implement group priority
Enable group priority.
Change-Id: I1777906e60d07420835ede904785071ee308c307 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> |
a6f9a41e | 24-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
manager: refactor setGroupState
setGroupState used to rely on std::set operations with non-obvious workings involving std::inserter with custom comparators.
However the logic required seem to be si
manager: refactor setGroupState
setGroupState used to rely on std::set operations with non-obvious workings involving std::inserter with custom comparators.
However the logic required seem to be simpler, therefore replacing the set-based implementation with a map-based one.
The current state of the leds is now stored in a map, replacing the previous two class members required with only one.
Change-Id: I3a812da4e5632c8258c45511f05ea1966b2f7208 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
d0f80506 | 23-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
manager: refactor loadJsonConfigV1 function
Extract 2 functions to have a 1:1 mapping between the json object being parsed and the function doing the parsing.
This will also enable testing these fu
manager: refactor loadJsonConfigV1 function
Extract 2 functions to have a 1:1 mapping between the json object being parsed and the function doing the parsing.
This will also enable testing these functions individually and allow for easy expansion of the config parser.
Change-Id: I0475c582aeac11538ec2d81c86fcf3819d9a220d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|