• Masahiro Yamada's avatar
    gen_compile_commands: use choices for --log_levels option · ea6cedc5
    Masahiro Yamada authored
    Use 'choices' to check if the given parameter is valid.
    
    I also simplified the help message because, with 'choices', --help
    shows the list of valid parameters:
    
      --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
    
    I started the help message with a lower case, "the level of log ..."
    in order to be consistent with the -h option:
    
      -h, --help            show this help message and exit
    
    The message "show this help ..." comes from the ArgumentParser library
    code, and I do not know how to change it. So, I changed our code.
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    ea6cedc5
gen_compile_commands.py 5.32 KB