Skip to content

Wrong behaviour when filename with underline #1

@hc7

Description

@hc7

Firstly mistake was:

  File "/home/hcs-i/arcadia/taxi/dh/mcu/projects/yabeacon/utils/logger-tool/logger-generate-tokens.py", line 89, in parse_module
    parser_error(filename, line_num, "Expected module '%s' but got '%s'" % (expected_name, module['name'], filename))
TypeError: not all arguments converted during string formatting

After fix I can see:

Error: In 'src/uart_ndma.c' line 53
       Expected module 'uart_ndma' but got 'uart-ndma' src/uart_ndma.c

File name is uart_ndma.c
I have been trying

// clang-format off
LOG_MODULE_DEFINE(uart_ndma); /* module name should same as file name */
// clang-format on

and
// clang-format off
LOG_MODULE_DEFINE(uart-ndma); /* module name should same as file name */
// clang-format on

It is not work. All time same mistake.
It becames ok only when file name is uart-ndma.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions