Add parsing error for choice blocks having multiple defines #22

Open
opened 2026-03-28 12:24:18 +00:00 by kloenk · 1 comment
Owner

Choice options can only have one main definition place and only very minor second options. Add validations for this

e.g. This is invalid

choice
	prompt "boolean choice"
	default BOOL_CHOICE1
	depends on A
	depends on y

config BOOL_CHOICE0
	bool "choice 0"

config BOOL_CHOICE1
	bool "choice 1"

endchoice

choice
    prompt "foo"

config BOOL_CHOICE0
    bool "ch2"
    
endchoice
Choice options can only have one main definition place and only very minor second options. Add validations for this e.g. This is invalid ```kconfig choice prompt "boolean choice" default BOOL_CHOICE1 depends on A depends on y config BOOL_CHOICE0 bool "choice 0" config BOOL_CHOICE1 bool "choice 1" endchoice choice prompt "foo" config BOOL_CHOICE0 bool "ch2" endchoice ```
Author
Owner

We also have to make sure that default (in the main choice parent) can only be a single symbol and nothing else

We also have to make sure that default (in the main choice parent) can only be a single symbol and nothing else
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rokc/rokc#22
No description provided.