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

Can't get cmt_insert_file_header working #76

Closed
ericb0774 opened this issue Dec 31, 2014 · 1 comment
Closed

Can't get cmt_insert_file_header working #76

ericb0774 opened this issue Dec 31, 2014 · 1 comment

Comments

@ericb0774
Copy link

I have a file named FileHeader.h in the root dir of my project.

My uncrustify.cfg file is also in my root project dir. The option in the file looks like this:

cmt_insert_file_header = "FileHeader.h" # string

I have the BBUncrustifyPlugin option to format on save enabled. My other uncrustify rules are being applied to the current file upon saving, but the file header is not being inserted. I do not have a C/C++ comment at the top of my source file.

Any suggestions? I have tried specifying a full path to the FileHeader.h, and moving the file to different directories, but I cannot get it working.

Thanks!

@benoitsan
Copy link
Owner

Thank you Eric, it was a bug and it should be fixed now.

Example:

I have _uncrustify.cfg in a Xcode project root folder.

In _uncrustify.cfg:

cmt_insert_file_header = "header.h"
utf8_force = true # needed if you are using utf-8 characters in header.h

header.h

//
// Created by Benoît Bourdon
// Copyright (c) 2015
// $(filename)
//

If needed, you can test your config with the command line ./uncrustify -l OC -c /path/to/_uncrustify.cfg -f /path/to/file.m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants