-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-enable clang-tidy
check for enum value range validation
#32289
Changes from all commits
e2d3275
5baea9e
400a39b
7f2d29c
7285802
5901ca0
69644de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -391,6 +391,8 @@ void ICDManager::SetKeepActiveModeRequirements(KeepActiveFlags flag, bool state) | |
{ | ||
assertChipStackLockedByCurrentThread(); | ||
|
||
// TODO: fix lint: https://github.com/project-chip/connectedhomeip/issues/32249 | ||
// NOLINTNEXTLINE(*.EnumCastOutOfRange) | ||
mKeepActiveFlags.Set(flag, state); | ||
if (mOperationalState == OperationalState::IdleMode && mKeepActiveFlags.HasAny()) | ||
{ | ||
|
@@ -511,6 +513,9 @@ void ICDManager::OnActiveRequestWithdrawal(KeepActiveFlags request) | |
{ | ||
// Only 1 request per type (kCommissioningWindowOpen, kFailSafeArmed) | ||
// remove requirement directly | ||
|
||
// TODO: fix lint: https://github.com/project-chip/connectedhomeip/issues/32249 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong link? |
||
// NOLINTNEXTLINE(*.EnumCastOutOfRange) | ||
this->SetKeepActiveModeRequirements(request, false /* state */); | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2692,6 +2692,8 @@ static void TestVIDPID_StringExtraction(nlTestSuite * inSuite, void * inContext) | |
{ DNAttrType::kMatterPID, ByteSpan(reinterpret_cast<const uint8_t *>(sTestMatterAttribute14), strlen(sTestMatterAttribute14)), false, false, chip::VendorId::NotSpecified, 0, CHIP_ERROR_WRONG_CERT_DN }, | ||
// Common Name (CN) VID/PID encoding examples: | ||
{ DNAttrType::kCommonName, ByteSpan(reinterpret_cast<const uint8_t *>(sTestCNAttribute01), strlen(sTestCNAttribute01)), true, false, chip::VendorId::TestVendor1, 0, CHIP_NO_ERROR }, | ||
// TODO: fix lint: https://github.com/project-chip/connectedhomeip/issues/32249 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong link? |
||
// NOLINTNEXTLINE(*.EnumCastOutOfRange) | ||
{ DNAttrType::kCommonName, ByteSpan(reinterpret_cast<const uint8_t *>(sTestCNAttribute02), strlen(sTestCNAttribute02)), true, false, static_cast<chip::VendorId>(0x002A), 0, CHIP_NO_ERROR }, | ||
{ DNAttrType::kCommonName, ByteSpan(reinterpret_cast<const uint8_t *>(sTestCNAttribute03), strlen(sTestCNAttribute03)), false, true, chip::VendorId::NotSpecified, 0xC20A, CHIP_NO_ERROR }, | ||
{ DNAttrType::kCommonName, ByteSpan(reinterpret_cast<const uint8_t *>(sTestCNAttribute04), strlen(sTestCNAttribute04)), false, true, chip::VendorId::NotSpecified, 0x03A5, CHIP_NO_ERROR }, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,9 @@ TLVType TLVReader::GetType() const | |
return kTLVType_FloatingPointNumber; | ||
if (elemType == TLVElementType::NotSpecified || elemType >= TLVElementType::Null) | ||
return static_cast<TLVType>(elemType); | ||
|
||
// TODO: fix lint: https://github.com/project-chip/connectedhomeip/issues/32249 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All these issue links are wrong.... |
||
// NOLINTNEXTLINE(*.EnumCastOutOfRange) | ||
return static_cast<TLVType>(static_cast<uint8_t>(elemType) & ~kTLVTypeSizeMask); | ||
} | ||
|
||
|
@@ -1030,6 +1033,9 @@ TLVElementType TLVReader::ElementType() const | |
{ | ||
if (mControlByte == static_cast<uint16_t>(kTLVControlByte_NotSpecified)) | ||
return TLVElementType::NotSpecified; | ||
|
||
// TODO: fix lint: https://github.com/project-chip/connectedhomeip/issues/32249 | ||
// NOLINTNEXTLINE(*.EnumCastOutOfRange) | ||
return static_cast<TLVElementType>(mControlByte & kTLVTypeMask); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That dos not look like the right link.