Discussion:
[ITK-dev] Pre-commit Failure uncrustify
Somesh
2016-09-12 18:49:56 UTC
Permalink
Hi,
I recently set up a ITK dev on my mac. While commiting a patch locally, I
am getting failure in precommit hooks. Specifically uncrustify is giving
the following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.

./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'

./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'

./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'

./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'

./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'

./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'

./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'

./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'

./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'

./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'

./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'

./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'

./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'

./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'

./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'

./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'

./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'

./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'

./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'

./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'

./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'

./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'

./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'

./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'


Thanks,
Somesh
Matt McCormick
2016-09-12 21:12:50 UTC
Permalink
Hi Somesh,

Yes, Dzenan recently improved upstream uncrustify and its
configuration in ITK so it works much better. A newer version of
uncrustify is required as described here:

https://github.com/InsightSoftwareConsortium/ITK/blob/6ee10575445aa1c878797db4febf7d775a38f1f3/Utilities/DevelopmentSetupScripts/GitTips.sh#L66-L74

Thanks,
Matt
Hi,
I recently set up a ITK dev on my mac. While commiting a patch locally, I am
getting failure in precommit hooks. Specifically uncrustify is giving the
following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.
./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'
./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'
./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'
./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'
./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'
./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'
./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'
./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'
./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'
./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'
./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'
./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'
./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'
./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'
./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'
./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'
Thanks,
Somesh
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers
Somesh
2016-09-13 01:03:49 UTC
Permalink
Hi Matt,
Do KWStyle and uncrustify play well with both enabled ?
I have uncrustify version 0.63 and the prehooks still fail. I believe
0.63 is the latest uncrustify version:
https://github.com/uncrustify/uncrustify/blob/master/CMakeLists.txt#L124

Thanks,
Somesh
Post by Matt McCormick
Hi Somesh,
Yes, Dzenan recently improved upstream uncrustify and its
configuration in ITK so it works much better. A newer version of
https://github.com/InsightSoftwareConsortium/ITK/blob/
6ee10575445aa1c878797db4febf7d775a38f1f3/Utilities/
DevelopmentSetupScripts/GitTips.sh#L66-L74
Thanks,
Matt
Post by Somesh
Hi,
I recently set up a ITK dev on my mac. While commiting a patch locally,
I am
Post by Somesh
getting failure in precommit hooks. Specifically uncrustify is giving the
following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.
./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'
./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'
./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'
./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'
./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'
./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'
./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'
./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'
./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'
./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'
./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'
./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'
./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'
./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'
./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'
./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'
Thanks,
Somesh
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
Somesh
2016-09-13 01:30:36 UTC
Permalink
Hi DÅŸenan,
I am using the HEAD of master uncrustify. The last commit to this repo was
made today.

commit 5a264cf59733fa8e0f69f8e6567e069a8cfd8bde
Merge: 553ef05 8ce4ca1
Author: Zhiming Wang <***@gmail.com>
Date: Mon Sep 12 10:22:27 2016 -0400

I have build from source using brew for mac.

Also my mergetool/difftool are all set. I am using OS X El Captain 10.11.6
and kaleidoscope tool for mac http://www.kaleidoscopeapp.com/.

Thanks,
Somesh
Post by Matt McCormick
Hi Somesh,
You need a recent master version (2016-08-26 or newer) which you can build
yourself from source available on GitHub
<https://github.com/uncrustify/uncrustify>.
Also, you need to have merge tool set. On Windows kdiff3 works well but
TortoiseMerge doesn't.
Regards,
DÅŸenan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)
Post by Somesh
Hi Matt,
Do KWStyle and uncrustify play well with both enabled ?
I have uncrustify version 0.63 and the prehooks still fail. I believe
0.63 is the latest uncrustify version: https://github.com/un
crustify/uncrustify/blob/master/CMakeLists.txt#L124
Thanks,
Somesh
On Mon, Sep 12, 2016 at 5:12 PM, Matt McCormick <
Post by Matt McCormick
Hi Somesh,
Yes, Dzenan recently improved upstream uncrustify and its
configuration in ITK so it works much better. A newer version of
https://github.com/InsightSoftwareConsortium/ITK/blob/6ee105
75445aa1c878797db4febf7d775a38f1f3/Utilities/DevelopmentSetu
pScripts/GitTips.sh#L66-L74
Thanks,
Matt
Post by Somesh
Hi,
I recently set up a ITK dev on my mac. While commiting a patch
locally, I am
Post by Somesh
getting failure in precommit hooks. Specifically uncrustify is giving
the
Post by Somesh
following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.
./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'
./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'
./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'
./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'
./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'
./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'
./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'
./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'
./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'
./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'
./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'
./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'
./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'
./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'
./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'
./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'
Thanks,
Somesh
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
Somesh
2016-09-13 02:14:57 UTC
Permalink
Is running uncrustify hooks a required process in the ITK development
workflow or can I disable it if I have to submit a patch ?

Thanks,
Somesh
Post by Somesh
Hi DÅŸenan,
I am using the HEAD of master uncrustify. The last commit to this repo was
made today.
commit 5a264cf59733fa8e0f69f8e6567e069a8cfd8bde
Merge: 553ef05 8ce4ca1
Date: Mon Sep 12 10:22:27 2016 -0400
I have build from source using brew for mac.
Also my mergetool/difftool are all set. I am using OS X El Captain 10.11.6
and kaleidoscope tool for mac http://www.kaleidoscopeapp.com/.
Thanks,
Somesh
Post by Matt McCormick
Hi Somesh,
You need a recent master version (2016-08-26 or newer) which you can
build yourself from source available on GitHub
<https://github.com/uncrustify/uncrustify>.
Also, you need to have merge tool set. On Windows kdiff3 works well but
TortoiseMerge doesn't.
Regards,
DÅŸenan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)
Post by Somesh
Hi Matt,
Do KWStyle and uncrustify play well with both enabled ?
I have uncrustify version 0.63 and the prehooks still fail. I believe
0.63 is the latest uncrustify version: https://github.com/un
crustify/uncrustify/blob/master/CMakeLists.txt#L124
Thanks,
Somesh
On Mon, Sep 12, 2016 at 5:12 PM, Matt McCormick <
Post by Matt McCormick
Hi Somesh,
Yes, Dzenan recently improved upstream uncrustify and its
configuration in ITK so it works much better. A newer version of
https://github.com/InsightSoftwareConsortium/ITK/blob/6ee105
75445aa1c878797db4febf7d775a38f1f3/Utilities/DevelopmentSetu
pScripts/GitTips.sh#L66-L74
Thanks,
Matt
Post by Somesh
Hi,
I recently set up a ITK dev on my mac. While commiting a patch
locally, I am
Post by Somesh
getting failure in precommit hooks. Specifically uncrustify is giving
the
Post by Somesh
following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.
./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'
./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'
./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'
./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'
./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'
./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'
./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'
./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'
./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'
./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'
./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'
./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'
./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'
./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'
./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'
./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'
Thanks,
Somesh
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
Dženan Zukić
2016-09-13 02:17:52 UTC
Permalink
It is not required.
Post by Somesh
Is running uncrustify hooks a required process in the ITK development
workflow or can I disable it if I have to submit a patch ?
Thanks,
Somesh
Post by Somesh
Hi DÅŸenan,
I am using the HEAD of master uncrustify. The last commit to this repo
was made today.
commit 5a264cf59733fa8e0f69f8e6567e069a8cfd8bde
Merge: 553ef05 8ce4ca1
Date: Mon Sep 12 10:22:27 2016 -0400
I have build from source using brew for mac.
Also my mergetool/difftool are all set. I am using OS X El
Captain 10.11.6 and kaleidoscope tool for mac http://www.kaleidoscopeapp
.com/.
Thanks,
Somesh
Post by Matt McCormick
Hi Somesh,
You need a recent master version (2016-08-26 or newer) which you can
build yourself from source available on GitHub
<https://github.com/uncrustify/uncrustify>.
Also, you need to have merge tool set. On Windows kdiff3 works well but
TortoiseMerge doesn't.
Regards,
DÅŸenan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)
Post by Somesh
Hi Matt,
Do KWStyle and uncrustify play well with both enabled ?
I have uncrustify version 0.63 and the prehooks still fail. I
believe 0.63 is the latest uncrustify version: https://github.com/un
crustify/uncrustify/blob/master/CMakeLists.txt#L124
Thanks,
Somesh
On Mon, Sep 12, 2016 at 5:12 PM, Matt McCormick <
Post by Matt McCormick
Hi Somesh,
Yes, Dzenan recently improved upstream uncrustify and its
configuration in ITK so it works much better. A newer version of
https://github.com/InsightSoftwareConsortium/ITK/blob/6ee105
75445aa1c878797db4febf7d775a38f1f3/Utilities/DevelopmentSetu
pScripts/GitTips.sh#L66-L74
Thanks,
Matt
Post by Somesh
Hi,
I recently set up a ITK dev on my mac. While commiting a patch
locally, I am
Post by Somesh
getting failure in precommit hooks. Specifically uncrustify is
giving the
Post by Somesh
following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.
./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'
./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'
./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'
./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'
./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'
./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'
./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'
./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'
./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'
./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'
./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'
./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'
./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'
./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'
./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'
./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'
Thanks,
Somesh
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
Dženan Zukić
2016-09-14 20:04:14 UTC
Permalink
Hi Somesh,

I just pulled master version of uncrustify, the last commit is on 10th (you
have a commit on 12th!):
Revision: 5d703fa01ff67afc029f31a5ac36bd2fbafb6aea
Author: gmaurel <***@maurel.de>
Date: 2016-09-10 15:06:05
Message: Merge pull request #756 from Unity-Technologies/fixes/make_
version_with_cmake

I must conclude that you are using somebody's fork of uncrustify, not HEAD
from the official repository. Can you verify this?

Regards,
DÅŸenan
Post by Dženan Zukić
It is not required.
Post by Somesh
Is running uncrustify hooks a required process in the ITK development
workflow or can I disable it if I have to submit a patch ?
Thanks,
Somesh
Post by Somesh
Hi DÅŸenan,
I am using the HEAD of master uncrustify. The last commit to this repo
was made today.
commit 5a264cf59733fa8e0f69f8e6567e069a8cfd8bde
Merge: 553ef05 8ce4ca1
Date: Mon Sep 12 10:22:27 2016 -0400
I have build from source using brew for mac.
Also my mergetool/difftool are all set. I am using OS X El
Captain 10.11.6 and kaleidoscope tool for mac http://www.kaleidoscopeapp
.com/.
Thanks,
Somesh
Post by Matt McCormick
Hi Somesh,
You need a recent master version (2016-08-26 or newer) which you can
build yourself from source available on GitHub
<https://github.com/uncrustify/uncrustify>.
Also, you need to have merge tool set. On Windows kdiff3 works well but
TortoiseMerge doesn't.
Regards,
DÅŸenan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)
Post by Somesh
Hi Matt,
Do KWStyle and uncrustify play well with both enabled ?
I have uncrustify version 0.63 and the prehooks still fail. I
believe 0.63 is the latest uncrustify version: https://github.com/un
crustify/uncrustify/blob/master/CMakeLists.txt#L124
Thanks,
Somesh
On Mon, Sep 12, 2016 at 5:12 PM, Matt McCormick <
Post by Matt McCormick
Hi Somesh,
Yes, Dzenan recently improved upstream uncrustify and its
configuration in ITK so it works much better. A newer version of
https://github.com/InsightSoftwareConsortium/ITK/blob/6ee105
75445aa1c878797db4febf7d775a38f1f3/Utilities/DevelopmentSetu
pScripts/GitTips.sh#L66-L74
Thanks,
Matt
Post by Somesh
Hi,
I recently set up a ITK dev on my mac. While commiting a patch
locally, I am
Post by Somesh
getting failure in precommit hooks. Specifically uncrustify is
giving the
Post by Somesh
following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.
./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'
./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'
./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'
./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'
./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'
./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'
./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'
./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'
./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'
./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'
./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'
./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'
./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'
./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'
./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'
./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'
Thanks,
Somesh
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
Somesh
2016-09-14 23:05:57 UTC
Permalink
Hi DÅŸenan,
You are right. I accidentally sent you the wrong commit info. I use
homebrew package manager for mac and I accidentally sent you the commit ID
of homebrew commit instead of uncrustify. See
https://github.com/Homebrew/brew/commit/5a264cf59733fa8e0f69f8e6567e069a8cfd8bde
. My apologies :)
However it seems I have correct version of uncrustify. Looking into the
uncrustify remotes that I have installed, this is what I am using:

origin https://github.com/uncrustify/uncrustify.git (fetch)
origin https://github.com/uncrustify/uncrustify.git (push)

With the last 5 commits as:


- 5d703fa01ff67afc029f31a5ac36bd2fbafb6aea Merge pull request #756 from
Unity-Technologies/fixes/make_version_with_cmake
- bc2b0c3e0c5b485cabbbcefcfb1eee76dbd62356 removed cmake dependency on
autotools and directly use make_version.py
- ac79e4081241359bdf3eec42baca690776ab565f make_version.py will be used
only to retrieve the version from the VCS.
- 3ef03cd6ac3fe218e77f14336e7c17daf75ba551 fixed instability retrieving
the version when under hg-git
- d9b0253f2d89c3556704bd45145d5bd4108f1043 Merge pull request #661 from
uncrustify/NewLineProt


I can take a look into why its not working for me in the weekend.

Thanks,
Somesh
Post by Matt McCormick
Hi Somesh,
I just pulled master version of uncrustify, the last commit is on 10th
Revision: 5d703fa01ff67afc029f31a5ac36bd2fbafb6aea
Date: 2016-09-10 15:06:05
Message: Merge pull request #756 from Unity-Technologies/fixes/make_
version_with_cmake
I must conclude that you are using somebody's fork of uncrustify, not HEAD
from the official repository. Can you verify this?
Regards,
DÅŸenan
Post by Dženan Zukić
It is not required.
Post by Somesh
Is running uncrustify hooks a required process in the ITK development
workflow or can I disable it if I have to submit a patch ?
Thanks,
Somesh
Post by Somesh
Hi DÅŸenan,
I am using the HEAD of master uncrustify. The last commit to this repo
was made today.
commit 5a264cf59733fa8e0f69f8e6567e069a8cfd8bde
Merge: 553ef05 8ce4ca1
Date: Mon Sep 12 10:22:27 2016 -0400
I have build from source using brew for mac.
Also my mergetool/difftool are all set. I am using OS X El
Captain 10.11.6 and kaleidoscope tool for mac
http://www.kaleidoscopeapp.com/.
Thanks,
Somesh
Post by Matt McCormick
Hi Somesh,
You need a recent master version (2016-08-26 or newer) which you can
build yourself from source available on GitHub
<https://github.com/uncrustify/uncrustify>.
Also, you need to have merge tool set. On Windows kdiff3 works well
but TortoiseMerge doesn't.
Regards,
DÅŸenan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)
Post by Somesh
Hi Matt,
Do KWStyle and uncrustify play well with both enabled ?
I have uncrustify version 0.63 and the prehooks still fail. I
believe 0.63 is the latest uncrustify version: https://github.com/un
crustify/uncrustify/blob/master/CMakeLists.txt#L124
Thanks,
Somesh
On Mon, Sep 12, 2016 at 5:12 PM, Matt McCormick <
Post by Matt McCormick
Hi Somesh,
Yes, Dzenan recently improved upstream uncrustify and its
configuration in ITK so it works much better. A newer version of
https://github.com/InsightSoftwareConsortium/ITK/blob/6ee105
75445aa1c878797db4febf7d775a38f1f3/Utilities/DevelopmentSetu
pScripts/GitTips.sh#L66-L74
Thanks,
Matt
Post by Somesh
Hi,
I recently set up a ITK dev on my mac. While commiting a patch
locally, I am
Post by Somesh
getting failure in precommit hooks. Specifically uncrustify is
giving the
Post by Somesh
following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.
./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'
./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'
./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'
./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'
./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'
./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'
./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'
./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'
./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'
./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'
./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'
./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'
./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'
./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'
./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'
./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'
Thanks,
Somesh
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
Dženan Zukić
2016-09-15 00:10:05 UTC
Permalink
Hi Somesh,

maybe ITK's hook is picking up a different version of uncrustify from what
you think it is using. Check how many uncrustify executables there are on
your machine, especially in ITK's source tree.

Regards,
DÅŸenan
Post by Somesh
Hi DÅŸenan,
You are right. I accidentally sent you the wrong commit info. I use
homebrew package manager for mac and I accidentally sent you the commit ID
of homebrew commit instead of uncrustify. See https://github.com/
Homebrew/brew/commit/5a264cf59733fa8e0f69f8e6567e069a8cfd8bde . My
apologies :)
However it seems I have correct version of uncrustify. Looking into the
origin https://github.com/uncrustify/uncrustify.git (fetch)
origin https://github.com/uncrustify/uncrustify.git (push)
- 5d703fa01ff67afc029f31a5ac36bd2fbafb6aea Merge pull request #756
from Unity-Technologies/fixes/make_version_with_cmake
- bc2b0c3e0c5b485cabbbcefcfb1eee76dbd62356 removed cmake dependency on
autotools and directly use make_version.py
- ac79e4081241359bdf3eec42baca690776ab565f make_version.py will be
used only to retrieve the version from the VCS.
- 3ef03cd6ac3fe218e77f14336e7c17daf75ba551 fixed instability
retrieving the version when under hg-git
- d9b0253f2d89c3556704bd45145d5bd4108f1043 Merge pull request #661
from uncrustify/NewLineProt
I can take a look into why its not working for me in the weekend.
Thanks,
Somesh
Post by Matt McCormick
Hi Somesh,
I just pulled master version of uncrustify, the last commit is on 10th
Revision: 5d703fa01ff67afc029f31a5ac36bd2fbafb6aea
Date: 2016-09-10 15:06:05
Message: Merge pull request #756 from Unity-Technologies/fixes/make_
version_with_cmake
I must conclude that you are using somebody's fork of uncrustify, not
HEAD from the official repository. Can you verify this?
Regards,
DÅŸenan
Post by Dženan Zukić
It is not required.
Post by Somesh
Is running uncrustify hooks a required process in the ITK development
workflow or can I disable it if I have to submit a patch ?
Thanks,
Somesh
Post by Somesh
Hi DÅŸenan,
I am using the HEAD of master uncrustify. The last commit to this repo
was made today.
commit 5a264cf59733fa8e0f69f8e6567e069a8cfd8bde
Merge: 553ef05 8ce4ca1
Date: Mon Sep 12 10:22:27 2016 -0400
I have build from source using brew for mac.
Also my mergetool/difftool are all set. I am using OS X El
Captain 10.11.6 and kaleidoscope tool for mac
http://www.kaleidoscopeapp.com/.
Thanks,
Somesh
On Mon, Sep 12, 2016 at 9:11 PM, Dzenan Zukic <
Post by Matt McCormick
Hi Somesh,
You need a recent master version (2016-08-26 or newer) which you can
build yourself from source available on GitHub
<https://github.com/uncrustify/uncrustify>.
Also, you need to have merge tool set. On Windows kdiff3 works well
but TortoiseMerge doesn't.
Regards,
DÅŸenan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)
Post by Somesh
Hi Matt,
Do KWStyle and uncrustify play well with both enabled ?
I have uncrustify version 0.63 and the prehooks still fail. I
believe 0.63 is the latest uncrustify version: https://github.com/un
crustify/uncrustify/blob/master/CMakeLists.txt#L124
Thanks,
Somesh
On Mon, Sep 12, 2016 at 5:12 PM, Matt McCormick <
Post by Matt McCormick
Hi Somesh,
Yes, Dzenan recently improved upstream uncrustify and its
configuration in ITK so it works much better. A newer version of
https://github.com/InsightSoftwareConsortium/ITK/blob/6ee105
75445aa1c878797db4febf7d775a38f1f3/Utilities/DevelopmentSetu
pScripts/GitTips.sh#L66-L74
Thanks,
Matt
Post by Somesh
Hi,
I recently set up a ITK dev on my mac. While commiting a patch
locally, I am
Post by Somesh
getting failure in precommit hooks. Specifically uncrustify is
giving the
Post by Somesh
following errors. Do I have to install a specific version of
uncrustify/python ? I installed uncrustify using brew.
./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol
'indent_cs_delegate_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol
'indent_token_after_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol
'indent_cpp_lambda_body'
./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol
'sp_angle_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol
'sp_after_operator_sym_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol
'sp_func_proto_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol
'sp_func_def_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol
'sp_func_class_paren_empty'
./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol
'sp_super_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol
'sp_this_paren'
./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol
'sp_skip_vbrace_tokens'
./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol
'align_var_class_span'
./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol
'align_var_class_thresh'
./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol
'align_var_class_gap'
./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol
'nl_oc_block_brace'
./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol
'nl_enum_own_lines'
./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol
'nl_func_class_scope'
./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol
'nl_func_decl_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol
'nl_func_def_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol
'nl_func_decl_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol
'nl_func_def_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol
'nl_func_decl_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol
'nl_func_def_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol
'nl_func_call_start_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol
'nl_func_call_args_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol
'nl_func_call_end_multi_line'
./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol
'nl_squeeze_ifdef_top_level'
./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol
'nl_split_if_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol
'nl_split_for_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol
'nl_split_while_one_liner'
./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol
'nl_after_func_class_proto'
./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol
'nl_after_func_class_proto_group'
./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol
'mod_full_brace_if_chain_only'
./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol
'cmt_multi_first_len_minimum'
./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol
'cmt_insert_before_inlines'
./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol
'cmt_insert_before_ctor_dtor'
./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol
'use_options_overriding_for_qt_macros'
./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol
'warn_level_tabs_found_in_verbatim_string_literals'
Thanks,
Somesh
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-developers
Johnson, Hans J
2016-09-12 18:58:37 UTC
Permalink
Somesh,

I don’t think that uncrustify and KWStyle are consistent. I think you need to turn off uncrustify.

Hans
--
From: Insight-developers <insight-developers-***@itk.org> on behalf of Somesh <***@gmail.com>
Date: Monday, September 12, 2016 at 1:49 PM
To: "insight-***@itk.org" <insight-***@itk.org>
Subject: [ITK-dev] Pre-commit Failure uncrustify

Hi,
I recently set up a ITK dev on my mac. While commiting a patch locally, I am getting failure in precommit hooks. Specifically uncrustify is giving the following errors. Do I have to install a specific version of uncrustify/python ? I installed uncrustify using brew.


./Utilities/Maintenance/uncrustify_itk.cfg:99 Unknown symbol 'indent_cs_delegate_brace'

./Utilities/Maintenance/uncrustify_itk.cfg:287 Unknown symbol 'indent_token_after_brace'

./Utilities/Maintenance/uncrustify_itk.cfg:290 Unknown symbol 'indent_cpp_lambda_body'

./Utilities/Maintenance/uncrustify_itk.cfg:424 Unknown symbol 'sp_angle_paren_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:533 Unknown symbol 'sp_after_operator_sym_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:570 Unknown symbol 'sp_func_proto_paren_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:576 Unknown symbol 'sp_func_def_paren_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:614 Unknown symbol 'sp_func_class_paren_empty'

./Utilities/Maintenance/uncrustify_itk.cfg:644 Unknown symbol 'sp_super_paren'

./Utilities/Maintenance/uncrustify_itk.cfg:647 Unknown symbol 'sp_this_paren'

./Utilities/Maintenance/uncrustify_itk.cfg:851 Unknown symbol 'sp_skip_vbrace_tokens'

./Utilities/Maintenance/uncrustify_itk.cfg:922 Unknown symbol 'align_var_class_span'

./Utilities/Maintenance/uncrustify_itk.cfg:925 Unknown symbol 'align_var_class_thresh'

./Utilities/Maintenance/uncrustify_itk.cfg:928 Unknown symbol 'align_var_class_gap'

./Utilities/Maintenance/uncrustify_itk.cfg:1068 Unknown symbol 'nl_oc_block_brace'

./Utilities/Maintenance/uncrustify_itk.cfg:1245 Unknown symbol 'nl_enum_own_lines'

./Utilities/Maintenance/uncrustify_itk.cfg:1256 Unknown symbol 'nl_func_class_scope'

./Utilities/Maintenance/uncrustify_itk.cfg:1284 Unknown symbol 'nl_func_decl_start_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1287 Unknown symbol 'nl_func_def_start_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1296 Unknown symbol 'nl_func_decl_args_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1299 Unknown symbol 'nl_func_def_args_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1314 Unknown symbol 'nl_func_decl_end_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1317 Unknown symbol 'nl_func_def_end_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1326 Unknown symbol 'nl_func_call_start_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1329 Unknown symbol 'nl_func_call_args_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1332 Unknown symbol 'nl_func_call_end_multi_line'

./Utilities/Maintenance/uncrustify_itk.cfg:1388 Unknown symbol 'nl_squeeze_ifdef_top_level'

./Utilities/Maintenance/uncrustify_itk.cfg:1461 Unknown symbol 'nl_split_if_one_liner'

./Utilities/Maintenance/uncrustify_itk.cfg:1465 Unknown symbol 'nl_split_for_one_liner'

./Utilities/Maintenance/uncrustify_itk.cfg:1469 Unknown symbol 'nl_split_while_one_liner'

./Utilities/Maintenance/uncrustify_itk.cfg:1541 Unknown symbol 'nl_after_func_class_proto'

./Utilities/Maintenance/uncrustify_itk.cfg:1544 Unknown symbol 'nl_after_func_class_proto_group'

./Utilities/Maintenance/uncrustify_itk.cfg:1662 Unknown symbol 'mod_full_brace_if_chain_only'

./Utilities/Maintenance/uncrustify_itk.cfg:1781 Unknown symbol 'cmt_multi_first_len_minimum'

./Utilities/Maintenance/uncrustify_itk.cfg:1812 Unknown symbol 'cmt_insert_before_inlines'

./Utilities/Maintenance/uncrustify_itk.cfg:1817 Unknown symbol 'cmt_insert_before_ctor_dtor'

./Utilities/Maintenance/uncrustify_itk.cfg:1878 Unknown symbol 'use_options_overriding_for_qt_macros'

./Utilities/Maintenance/uncrustify_itk.cfg:1885 Unknown symbol 'warn_level_tabs_found_in_verbatim_string_literals'


Thanks,
Somesh
Loading...