Skip to content
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

Fix doc build issue in ERROR_CODES.md #25894

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions docs/ERROR_CODES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[//]: # "start_ignore_spellcheck"

# Matter SDK `CHIP_ERROR` enums values

This file was **AUTOMATICALLY** generated by
Expand All @@ -10,7 +8,7 @@ This file was **AUTOMATICALLY** generated by
- [SDK Core errors: range `0x000..0x0FF`](#sdk-core-errors)
- [SDK Inet Layer errors: range `0x100..0x1FF`](#sdk-inet-layer-errors)
- [SDK Device Layer errors: range `0x200..0x2FF`](#sdk-device-layer-errors)
- [ASN.1 Layer errors: range `0x300..0x3FF`](#asn-1-layer-errors)
- [ASN1 Layer errors: range `0x300..0x3FF`](#asn1-layer-errors)
- [BLE Layer errors: range `0x400..0x4FF`](#ble-layer-errors)
- [IM Global errors errors: range `0x500..0x5FF`](#im-global-errors-errors)

Expand Down Expand Up @@ -179,7 +177,7 @@ This file was **AUTOMATICALLY** generated by
| 515 | 0x203 | `CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_ABORTED` |
| 516 | 0x204 | `CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_IGNORED` |

## ASN.1 Layer errors
## ASN1 Layer errors

| Decimal | Hex | Name |
| ------- | ----- | --------------------------------- |
Expand Down Expand Up @@ -255,5 +253,3 @@ This file was **AUTOMATICALLY** generated by
| 1481 | 0x5C9 | `TIMED_REQUEST_MISMATCH` |
| 1482 | 0x5CA | `FAILSAFE_REQUIRED` |
| 1520 | 0x5F0 | `WRITE_IGNORED` |

[//]: # "end_ignore_spellcheck"
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Sphinx>=4.5
sphinx-book-theme
myst-parser
breathe>=4.34
pydata-sphinx-theme==0.13.1
7 changes: 1 addition & 6 deletions scripts/error_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,11 @@ def main():
"src/lib/core/CHIPError.h": ErrorDescriptor(section="SDK Core", code_range=0x000, macro_regex=r"^#define\s+(?P<name>[_A-Z0-9]+)\s+CHIP(_CORE)?_ERROR[(](?P<code>(0x[a-fA-F0-9]+)|\d+)[)]"),
"src/inet/InetError.h": ErrorDescriptor(section="SDK Inet Layer", code_range=0x100, macro_regex=r"^#define\s+(?P<name>[_A-Z0-9]+)\s+CHIP_INET_ERROR[(](?P<code>(0x[a-fA-F0-9]+)|\d+)[)]"),
"src/include/platform/CHIPDeviceError.h": ErrorDescriptor(section="SDK Device Layer", code_range=0x200, macro_regex=r"^#define\s+(?P<name>[_A-Z0-9]+)\s+CHIP_DEVICE_ERROR[(](?P<code>(0x[a-fA-F0-9]+)|\d+)[)]"),
"src/lib/asn1/ASN1Error.h": ErrorDescriptor(section="ASN.1 Layer", code_range=0x300, macro_regex=r"^#define\s+(?P<name>[_A-Z0-9]+)\s+CHIP_ASN1_ERROR[(](?P<code>(0x[a-fA-F0-9]+)|\d+)[)]"),
"src/lib/asn1/ASN1Error.h": ErrorDescriptor(section="ASN1 Layer", code_range=0x300, macro_regex=r"^#define\s+(?P<name>[_A-Z0-9]+)\s+CHIP_ASN1_ERROR[(](?P<code>(0x[a-fA-F0-9]+)|\d+)[)]"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ASN.1" is the right spelling, though!

"src/ble/BleError.h": ErrorDescriptor(section="BLE Layer", code_range=0x400, macro_regex=r"^#define\s+(?P<name>[_A-Z0-9]+)\s+CHIP_BLE_ERROR[(](?P<code>(0x[a-fA-F0-9]+)|\d+)[)]"),
"src/protocols/interaction_model/StatusCodeList.h": ErrorDescriptor(section="IM Global errors", code_range=0x500, macro_regex=r"^CHIP_IM_STATUS_CODE[(][A-Za-z0-9_]+\s*,\s*(?P<name>[A-Z0-9_]+)\s*,\s*(?P<code>(0x[a-fA-F0-9]+)|\d+)[)]"),
}

print()
print("[//]: # (start_ignore_spellcheck)")
print()
print("# Matter SDK `CHIP_ERROR` enums values")
print()
print("This file was **AUTOMATICALLY** generated by `python scripts/error_table.py > docs/ERROR_CODES.md`.")
Expand All @@ -157,8 +154,6 @@ def main():
for filename, descriptor in descriptors.items():
dump_table(Path(filename), descriptor)

print("[//]: # (end_ignore_spellcheck)")


if __name__ == "__main__":
main()