Skip to content

Autoformat might remove characters from method declarations #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rsora opened this issue Feb 26, 2021 · 1 comment
Closed

Autoformat might remove characters from method declarations #45

rsora opened this issue Feb 26, 2021 · 1 comment
Labels
conclusion: resolved Issue was resolved criticality: medium Of moderate impact topic: language server Related to the Arduino Language Server type: imperfection Perceived defect in any part of project

Comments

@rsora
Copy link
Contributor

rsora commented Feb 26, 2021

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]
@rsora rsora added type: bug priority: medium Resolution is a medium priority labels Feb 26, 2021
@cmaglie cmaglie removed the type: bug label Sep 16, 2021
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@rsora rsora added criticality: medium Of moderate impact and removed priority: medium Resolution is a medium priority type: imperfection Perceived defect in any part of project labels Nov 2, 2021
@per1234
Copy link
Contributor

per1234 commented Jun 8, 2022

I was not able to reproduce this, even using 2.0.0-beta.3. However, any of these content loss issues should be solved by #1019

If anyone is still able to reproduce this issue using the latest nightly build, please comment here and I will investigate.

@per1234 per1234 closed this as completed Jun 8, 2022
@per1234 per1234 added conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project topic: language server Related to the Arduino Language Server labels Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: medium Of moderate impact topic: language server Related to the Arduino Language Server type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants