Skip to content

Commit

Permalink
msggen: Allow non_camel_case for notification
Browse files Browse the repository at this point in the history
In rust enum are expected to be CamelCase.
However, we are generating enum's using CAPITAL_SNAKE_CASE.

This generates a warning and breaks CI.

See `cln_rpc::notifications::ConnectAddressType::LOCAL_SOCKET`
  • Loading branch information
ErikDeSmedt committed Feb 19, 2024
1 parent e6f368c commit 3cac22b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cln-rpc/src/notifications.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(non_camel_case_types)]
// This file is autogenerated by `msggen`
// Do not edit it manually, your changes will be overwritten

Expand Down
1 change: 1 addition & 0 deletions contrib/msggen/msggen/gen/rpc/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def generate_enum(self, service: Service):
self.write("}\n")

def generate(self, service: Service) -> None:
self.write("#![allow(non_camel_case_types)]\n")
self.write("// This file is autogenerated by `msggen`\n")
self.write("// Do not edit it manually, your changes will be overwritten\n\n\n")
self.write("\n")
Expand Down

0 comments on commit 3cac22b

Please sign in to comment.