Format: limit column width to 80 #297

Merged
merged 3 commits into from Apr 18, 2016

Conversation

Projects
None yet
5 participants
@tammoippen
Contributor

tammoippen commented Apr 7, 2016

This is purely a reformatting of code as requested in #62.

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser Apr 11, 2016

Contributor

👍 from my side. @apeyser Would you take a look as well?

Contributor

heplesser commented Apr 11, 2016

👍 from my side. @apeyser Would you take a look as well?

@apeyser

This comment has been minimized.

Show comment
Hide comment
@apeyser

apeyser Apr 11, 2016

Contributor

👍

Contributor

apeyser commented Apr 11, 2016

👍

Merge branch 'master' into column_width_80
# Conflicts:
#	models/aeif_cond_alpha.cpp
#	models/aeif_cond_alpha_RK5.cpp
#	models/aeif_cond_alpha_multisynapse.cpp
#	models/aeif_cond_exp.cpp
#	models/amat2_psc_exp.cpp
#	models/binary_neuron_impl.h
#	models/cont_delay_connection_impl.h
#	models/correlomatrix_detector.cpp
#	models/correlospinmatrix_detector.cpp
#	models/gamma_sup_generator.cpp
#	models/hh_cond_exp_traub.cpp
#	models/hh_psc_alpha.cpp
#	models/hh_psc_alpha_gap.cpp
#	models/ht_neuron.cpp
#	models/iaf_chs_2007.cpp
#	models/iaf_chxk_2008.cpp
#	models/iaf_cond_alpha.cpp
#	models/iaf_cond_alpha_mc.cpp
#	models/iaf_cond_exp.cpp
#	models/iaf_cond_exp_sfa_rr.cpp
#	models/iaf_neuron.cpp
#	models/iaf_psc_alpha.cpp
#	models/iaf_psc_alpha_multisynapse.cpp
#	models/iaf_psc_delta.cpp
#	models/iaf_psc_exp.cpp
#	models/iaf_psc_exp_multisynapse.cpp
#	models/iaf_tum_2000.cpp
#	models/izhikevich.cpp
#	models/mat2_psc_exp.cpp
#	models/mip_generator.cpp
#	models/parrot_neuron.cpp
#	models/poisson_generator.cpp
#	models/pp_pop_psc_delta.cpp
#	models/pp_psc_delta.cpp
#	models/ppd_sup_generator.cpp
#	models/pulsepacket_generator.cpp
#	models/sinusoidal_gamma_generator.cpp
#	models/sinusoidal_poisson_generator.cpp
#	models/spike_dilutor.cpp
#	models/volume_transmitter.cpp
#	nest/neststartup.cpp
#	nest/sli_neuron.cpp
#	nestkernel/conn_builder.cpp
#	nestkernel/connection.h
#	nestkernel/connection_builder_manager.cpp
#	nestkernel/connection_builder_manager.h
#	nestkernel/connection_manager.cpp
#	nestkernel/connection_manager.h
#	nestkernel/connector_model_impl.h
#	nestkernel/delay_checker.cpp
#	nestkernel/event_delivery_manager.cpp
#	nestkernel/kernel_manager.cpp
#	nestkernel/nest.cpp
#	nestkernel/nestmodule.cpp
#	nestkernel/ring_buffer.h
#	nestkernel/simulation_manager.cpp
#	nestkernel/sp_manager.cpp
#	nestkernel/universal_data_logger_impl.h
#	nestkernel/vp_manager.cpp
#	precise/iaf_psc_alpha_canon.cpp
#	precise/iaf_psc_alpha_presc.cpp
#	precise/iaf_psc_delta_canon.cpp
#	precise/iaf_psc_exp_ps.cpp
#	precise/parrot_neuron_ps.cpp
#	precise/poisson_generator_ps.cpp
#	precise/slice_ring_buffer.cpp
#	topology/connection_creator.h
#	topology/connection_creator_impl.h
#	topology/layer_impl.h

@abigailm abigailm merged commit 7537a6b into nest:master Apr 18, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Silmathoron

This comment has been minimized.

Show comment
Hide comment
@Silmathoron

Silmathoron Apr 18, 2016

Contributor

Sorry to reopen a merged PR, but fixing the conflicts with mine, I realized that there are still some lines longer 80, for instance in modelsmodule.cpp.

Contributor

Silmathoron commented Apr 18, 2016

Sorry to reopen a merged PR, but fixing the conflicts with mine, I realized that there are still some lines longer 80, for instance in modelsmodule.cpp.

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser Apr 18, 2016

Contributor

@Silmathoron Can you pull the current master into your branch and then use clang-format-3.6 to reformat your code where necessary?

Contributor

heplesser commented Apr 18, 2016

@Silmathoron Can you pull the current master into your branch and then use clang-format-3.6 to reformat your code where necessary?

@Silmathoron

This comment has been minimized.

Show comment
Hide comment
@Silmathoron

Silmathoron Apr 18, 2016

Contributor

Yes I can, but I'm not sure we are talking about the same thing: I was saying that files on the nest/nest-simulator master branch still have lines longer than 80 (see previous link).

Contributor

Silmathoron commented Apr 18, 2016

Yes I can, but I'm not sure we are talking about the same thing: I was saying that files on the nest/nest-simulator master branch still have lines longer than 80 (see previous link).

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser Apr 18, 2016

Contributor

@tammoippen Could you clarify how to proceed here?

Contributor

heplesser commented Apr 18, 2016

@tammoippen Could you clarify how to proceed here?

@tammoippen

This comment has been minimized.

Show comment
Hide comment
@tammoippen

tammoippen Apr 18, 2016

Contributor

@heplesser @Silmathoron
clang-format makes an estimate on what is best: sticking to 80 column lines and readability (I guess at least), and it also has some problems with breaking some lines, e.g. it tries to break comments by whitespace, hence it has some problems with comments like:

//-------------------------------------------------------------------------------------

So, the code is at most 80 columns for most lines, with some exceptions. Also see here for PenaltyExcessCharacter.

Contributor

tammoippen commented Apr 18, 2016

@heplesser @Silmathoron
clang-format makes an estimate on what is best: sticking to 80 column lines and readability (I guess at least), and it also has some problems with breaking some lines, e.g. it tries to break comments by whitespace, hence it has some problems with comments like:

//-------------------------------------------------------------------------------------

So, the code is at most 80 columns for most lines, with some exceptions. Also see here for PenaltyExcessCharacter.

@tammoippen tammoippen referenced this pull request Apr 26, 2016

Closed

clang-format line length #62

@tammoippen tammoippen deleted the tammoippen:column_width_80 branch Apr 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment