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

Format: limit column width to 80 #297

Merged
merged 3 commits into from
Apr 18, 2016
Merged

Conversation

tammoippen
Copy link
Contributor

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

@heplesser
Copy link
Contributor

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

@apeyser
Copy link
Contributor

apeyser commented Apr 11, 2016

👍

# 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
@Silmathoron
Copy link
Member

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
Copy link
Contributor

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

@Silmathoron
Copy link
Member

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
Copy link
Contributor

@tammoippen Could you clarify how to proceed here?

@tammoippen
Copy link
Contributor Author

@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 deleted the column_width_80 branch April 26, 2016 13:11
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

Successfully merging this pull request may close these issues.

5 participants