Skip to content
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

Autoformat trashes fancy comments... #8187

Closed
WestfW opened this issue Nov 10, 2018 · 3 comments
Closed

Autoformat trashes fancy comments... #8187

WestfW opened this issue Nov 10, 2018 · 3 comments
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature

Comments

@WestfW
Copy link
Contributor

WestfW commented Nov 10, 2018

If I start with a nice (and relatively standard) command block like:

/****************************************************
 *  Test program for digitalWriteFast()             *
 *  November 2018, by Bill Westfield.               *
 *  This test sketch is in the Public Domain        *
 ****************************************************
 *                                                  *
 * This sketch isn't really meant to be run.        *
 *  Rather, you compile it and look at the code     *
 *  that has been created to confirm that it has    *
 *  the appropriate minimal instruction sequences.  *
 *                                                  *
 *  Test matrix:                                    *
 *                                                  *
 *     Arduino Core  Boards:                        *
 *                                                  *
 *      Uno (xx8)                                   *
 *      Micro (32u4)                                *
 *      Mega                                        *
 *                                                  *

And then use "autoformat", it deletes all of my carefully added "asterisk blocks" and leaves only:


/****************************************************
    Test program for digitalWriteFast()
    November 2018, by Bill Westfield.
    This test sketch is in the Public Domain
 ****************************************************
 *                                                  *
   This sketch isn't really meant to be run.
    Rather, you compile it and look at the code
    that has been created to confirm that it has
    the appropriate minimal instruction sequences.
 *                                                  *
    Test matrix:
 *                                                  *
       Arduino Core  Boards:
 *                                                  *
        Uno (xx8)
        Micro (32u4)
        Mega
 *                                                  */
@per1234
Copy link
Collaborator

per1234 commented Nov 10, 2018

This is caused by the remove-comment-prefix Artistic Style option:

remove-comment-prefix

Related issue: #3941

@WestfW
Copy link
Contributor Author

WestfW commented Nov 11, 2018

I would prefer that autoformat not touch comments, perhaps with the exception of indenting already indented comments to match the code indentation...

@per1234 per1234 added Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) labels Aug 1, 2020
@per1234
Copy link
Collaborator

per1234 commented Apr 5, 2021

Closing as wontfix because the current Artistic Style configuration is now thoroughly established and each user can configure it to their preference.

The new ClangFormat-based auto formatter of Arduino IDE 2.x does not mess with the fanciness of block comments at all, so the future looks bright.

@per1234 per1234 closed this as completed Apr 5, 2021
@per1234 per1234 added the Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature label Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature
Projects
None yet
Development

No branches or pull requests

2 participants