Review Request 122658: Adds ClangFormat to kdevcustomscript_plugin

Mario Bielert mario.bielert at tu-dresden.de
Thu May 14 19:39:12 UTC 2015



> On April 15, 2015, 9:14 vorm., Kevin Funk wrote:
> > Heya, one issue remains: For me, there is just a clang-format-3.x binary available. So just invoking 'clang-format' (silently) fails.
> > 
> > Maybe you have ideas how to better deal with this situation?

Sorry for the late reply, hadn't much time recently.

I actually don't have a satisfying solution for this issue, due to different reasons. First I'm not even closely familiar with Qt, KDELibs or Kdevplatforms, so I unfortunately don't know, which way would be the best to implement either the notice, that the executable is missing, or a search and selection of a proper executable. Any thoughts on that?

Second if you haven't installed e.g. GNU indent, formattors based on this also fails silently. But yeah it's slightly different, because it's not obvious, that you need a clang-format executable instead of a clang-format-x.y executable. I just realized, that my Debian also misses this link and I have created it manually. Personally, I think, that this is a bug in packaging clang-format. But I can understand this, as clang-format has been changed a lot since version 3.2. While 3.2 not even had the option "-style=file", the recognized keywords in the .clang-format files differs from version to version. This being said, even if I could write the code to search for possible instances of clang-format, I couldn't come up with a strategy to choose one, in case there are found several different versions, as I can't know, which version should be used for the intended .clang-format file.

I still have the feeling, that this patch can be useful, if we add some sort of error message.


- Mario


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122658/#review78960
-----------------------------------------------------------


On April 10, 2015, 9:07 nachm., Mario Bielert wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122658/
> -----------------------------------------------------------
> 
> (Updated April 10, 2015, 9:07 nachm.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> This patch adds ClangFormat as a predefinded style to customscript_plugin formatter
> 
> 
> Diffs
> -----
> 
>   formatters/customscript/customscript_plugin.cpp 8e2e6bb 
> 
> Diff: https://git.reviewboard.kde.org/r/122658/diff/
> 
> 
> Testing
> -------
> 
> Not much testing required, as it's just a few lines adding the command line and a name.
> 
> 
> Thanks,
> 
> Mario Bielert
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150514/90561fb4/attachment.html>


More information about the KDevelop-devel mailing list