Skip to content

Autoformat might remove characters from method declarations #45

Closed
@rsora

Description

@rsora

Describe the bug
declaring a function like this in the .ino files

void     foo(int i, float x, void* ptr) {}

(please note the extra spaces)

and calling the autoformat might cause the autoformat to remove some characters:

void foo(int i, float x,  vid *ptr) {}

(please note the missing o in void)

To Reproduce
Steps to reproduce the behavior:

  1. Open new sketch
  2. Write the following function: void foo(int i, float x, void* ptr) {}
  3. Tools > Autoformat
  4. See error on vid type in function declaration

Expected behavior
Function correctly formatted like:

void foo(int i, float x, void *ptr) {}

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.4 LTS 64bit
  • Version: 2.0.0-beta.3-snapshot.9fb8c4b
  • Date: 2021-02-25T15:29:51.087Z
  • CLI Version: 0.16.1 alpha [76f55490]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions