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

Feature Request: Add clang-format setting to disable "*" being added when ReflowComments is used with /* */ comments #58710

Open
sean-mcmanus opened this issue Oct 31, 2022 · 15 comments
Labels
clang-format good first issue https://github.com/llvm/llvm-project/contribute

Comments

@sean-mcmanus
Copy link

sean-mcmanus commented Oct 31, 2022

Create a .clang-format file with contents

ColumnLimit: 80
ReflowComments: true

with a test.cpp file (in the same folder as the .clang-format file) like

/* erfdfdfdfdfdfd fd fdfd fd fd fd fd fd fd fd fd fd fd fd fd fd fdf df df df df df df df df df df df fd f */
void func()
{
}

Bug: The result is

/* erfdfdfdfdfdfd fd fdfd fd fd fd fd fd fd fd fd fd fd fd fd fd fdf df df df df
 * df df df df df df df fd f */

but we'd like a setting so the result can be

/* erfdfdfdfdfdfd fd fdfd fd fd fd fd fd fd fd fd fd fd fd fd fd fdf df df df df
   df df df df df df df fd f */
@sean-mcmanus sean-mcmanus changed the title Feature Request: clang-format Feature Request: Add clang-format setting to disable "*" being added when ReflowComments is used Oct 31, 2022
@EugeneZelenko EugeneZelenko added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature clang-format and removed new issue labels Oct 31, 2022
@llvmbot
Copy link
Member

llvmbot commented Oct 31, 2022

@llvm/issue-subscribers-clang-format

@sean-mcmanus sean-mcmanus changed the title Feature Request: Add clang-format setting to disable "*" being added when ReflowComments is used Feature Request: Add clang-format setting to disable "*" being added when ReflowComments is used with /* */ comments Oct 31, 2022
@HazardyKnusperkeks HazardyKnusperkeks added the good first issue https://github.com/llvm/llvm-project/contribute label Nov 15, 2022
@llvmbot
Copy link
Member

llvmbot commented Nov 15, 2022

@llvm/issue-subscribers-good-first-issue

@ShriKaranHanda
Copy link

Can I work on this?

@apwadkar
Copy link

I've started working on this, since it seems like it hasn't been picked up. My current idea is adding a DecorateReflowedComments option to control whether or not the * appears for reflowed block comments. I have a review here.

@xonx4l
Copy link

xonx4l commented Aug 11, 2023

I would like to work on this can you give me a little more context

@sean-mcmanus
Copy link
Author

@xonx4l Who are you asking? What type of context do you want?

@xonx4l
Copy link

xonx4l commented Aug 11, 2023

@sean-mcmanus I wanted a little bit more info on this issue as I am unable to reproduce the described bug . Thanks .

@sean-mcmanus
Copy link
Author

@xonx4l I've edited the original description to be more explicit in regards to the .clang-format file. Are you able to repro it now? I repro the bug with clang-format 16.0.6 on Windows. If not, I could look into providing an exact command line argument (or if you can let me know what clang-format call you're using that's not working).

@WLOrion
Copy link

WLOrion commented Nov 16, 2023

Hello @sean-mcmanus, I'd like to take to me this issue. How can I assign it to me? Meanwhile, I going to work to understand and, if possbile, resolve it.

@sean-mcmanus
Copy link
Author

@WLOrion I don't know. I don't work on LLVM/clang-format. I just use it and filed the feature request.

@WLOrion
Copy link

WLOrion commented Nov 16, 2023

@mydeveloperday, can you help me about that?

@sean-mcmanus
Copy link
Author

@WLOrion FYI, there are contribution instructions at https://llvm.org/docs/Contributing.html (but I haven't read them).

@Sh0g0-1758
Copy link
Member

@sean-mcmanus , this seems like a simple issue. Can you please the issue to me so that I can start working on it.

@sean-mcmanus
Copy link
Author

@Sh0g0-1758 I'm not an LLVM developer. I don't have permissions to assign issues to people in this repo.

@rajkumarananthu
Copy link
Contributor

Hi,

I am working on one more issue: #53390 where I am adding a similar boolean flag to control to the indentation of NamespaceAliases and UsingDeclarations, I would like to add this as well.

If anyone has permissions, please assign the issue to me.

Thanks
Rajkumar Ananthu.

rajkumarananthu added a commit to rajkumarananthu/llvm-project that referenced this issue Aug 12, 2024
…s to

IndentNamespaceAliases, IndentUsingDeclarations and
DecorateReflowedComments.

Issue llvm#53390 was reported to have an option to control indenting
namespace aliases independently of NamespaceIndentation, added this
feature.

Issue llvm#58710 was reported to have an option to control the decoration of
the block comments, added this feature.
@owenca owenca removed the enhancement Improving things as opposed to bug fixing, e.g. new or missing feature label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-format good first issue https://github.com/llvm/llvm-project/contribute
Projects
None yet
Development

No branches or pull requests