roboticslab-uc3m / xgnitive

Research on algorithms for Continuous Goal-Directed Actions (CGDA), Robot Imagination System (RIS)...
http://robots.uc3m.es/dox-xgnitive/
GNU Lesser General Public License v2.1
5 stars 1 forks source link

Unify line endings #59

Closed PeterBowman closed 6 years ago

PeterBowman commented 6 years ago

Several files use Windows (CRLF) line endings (8c2f26c9724e16a3b159816c583582f6b6a17ed5):

$ find -type f -exec file {} + | grep -i CRLF | awk '{ print $1; }' | sed -e 's/:$//'
./programs/cgdaExecutionOET/cgdaExecutionOETOpenrave/CgdaIronFitnessFunction.hpp
./programs/cgdaExecutionOET/cgdaExecutionOETOpenrave/main.cpp
./programs/cgdaExecutionOET/cgdaExecutionOETOpenrave/CgdaPaintFitnessFunction.hpp
./programs/drl/experiments/experiment_2017_10_30_11_FIRST_NO_BUG_EXPERIMENT/progress.csv
./programs/drl/experiments/experiment_2017_11_28_REMOTE-INSTREW-DYNLI-NOPEN-BIGREW-ENC/progress.csv
./programs/drl/experiments/experiment_2017_11_08_NO_DELAY_DYNAMIC_LIMITS_2/progress.csv
./programs/drl/experiments/experiment_2017_11_16_DELAY_DYNAMICLI_INSTREW_NOPENALTY/progress.csv
./programs/drl/experiments/experiment_2017_11_16_DELAY_DYNAMICLI_INCREW/progress.csv
./programs/drl/experiments/experiment_2017_11_07_NO_DELAY_DYNAMIC_LIMITS/progress.csv
./programs/drl/experiments/experiment_2017_11_15_DELAY_DINAMYCLI_INCREW/progress.csv
./programs/drl/experiments/experiment_2017_11_22_NOLOCAL-INSTREW-FIXEDLIM-NOPEN-BIGREW-ENC/progress.csv
./programs/drl/experiments/experiment_2017_11_14_DELAY_FIXED_LI/progress.csv
./programs/drl/experiments/experiment_2017_11_13_DELAY_DYNAMIC_LI/progress.csv
./programs/drl/experiments/experiment_2017_11_24_REMOTE_INSTREW-FIXEDLI-NOPEN-BIGREW-ENC/progress.csv
./programs/drl/experiments/experiment_2017_11_20_NOLOCAL_DELAY_DYNAMICLI_INTREW_NOPENALTY/progress.csv
./programs/drl/experiments/experiment_2017_11_10_DELAY_DYNAMIC_LI/progress.csv
./programs/drl/experiments/experiment_2017_11_03_FIRST_EXPERIMENT_LOCAL_OPENRAVE_N0_DELAY/progress.csv
./programs/drl/experiments/experiment_2017_12_12_REMOTE-INSTREW-DYNLI-NOPEN-64S/progress.csv
./programs/drl/experiments/experiment_2017_12_12_REMOTE-INSTREW-DYNLI-NOPEN-64S-SMALL/progress.csv
./programs/drl/experiments/experiment_2017_11_15_DELAY_DINAMYCLI_INSTCREW/progress.csv
./programs/drl/experiments/experiment_2017_10_31_NO_DELAY_FIRST_EXPERIMENT/progress.csv
./programs/drl/experiments/experiment_2017_11_23_REMOTE_INSTREW-DYNAMICLI-NOPEN-BIGREW-NOENC/progress.csv
./programs/drl/experiments/experiment_2017_11_23_REMOTE_INSTREW-DYNAMICLI-NOPEN-BIGREW-NOENC/experiment__2017_11_23_REMOTE_INSTREW-DYNAMICLI-NOPEN-BIGREW-NOENC/progress.csv
./programs/cgdaExecutionIET/cgdaExecutionIET/CgdaWaxFitnessFunction.hpp
./programs/cgdaExecutionIET/cgdaExecutionIET/CgdaIronFitnessFunction.hpp
./programs/cgdaExecutionIET/cgdaExecutionIET/main.cpp
./programs/cgdaExecutionIET/cgdaExecutionIET/CgdaPaintFitnessFunction.hpp
./programs/cgdaExecutionIET/cgdaExecutionIET/CgdaConstrainedPaintFitnessFunction.hpp
./programs/cgdaExecutionIET/cgdaExecutionIET/CgdaConstrainedWaxFitnessFunction.hpp
./programs/cgdaExecutionIET/conf/evMono_ecf_params_WAX.xml
./programs/cgdaExecutionIET/cgdaExecutionIETYarp/main.cpp
./programs/cgdaExecutionIET/cgdaExecutionIETYarp/CgdaConstrainedPaintFitnessFunction.hpp
./libraries/EcfComponents/AlgPSOInheritance.hpp
./libraries/EcfComponents/AlgConstrainedSST.cpp
./libraries/EcfComponents/AlgConstrainedSST.hpp

Use this:

$ find -type f -exec dos2unix {} +
$ git diff --word-diff=color --word-diff-regex=.

Beware of stale branches!

RaulFdzbis commented 6 years ago

Done at https://github.com/roboticslab-uc3m/xgnitive/commit/0c216b33fd47609cdf3aa6c4b399a37e8d640137! Lot of changes but looking good.

This has been a recurrent problem in some of my code, I think maybe gedit or another editor may be introducing this line breaks. I'm not sure. I will try to detect the origin of this and fix it.

Thank you @PeterBowman!!! :D

PeterBowman commented 6 years ago

Thanks, @RaulFdzbis! I noticed there are two development branches of yours which might need merge+normalization as well: demonstration-feature-selection-issue-36, simulated-wrinkle.

RaulFdzbis commented 6 years ago

Done! https://github.com/roboticslab-uc3m/xgnitive/commit/93bf9d08df0ea8429b4f934610edb4280cfff108 and https://github.com/roboticslab-uc3m/xgnitive/commit/9efc379df318d478231d7a1dcd85e11b21ac71f7.

RaulFdzbis commented 6 years ago

Should we close this now?

PeterBowman commented 6 years ago

I was wondering whether source files should be incidentally converted to UTF-8 (from ASCII). That might deserve a separate issue, if deemed necessary at all. Thanks, closing.

jgvictores commented 6 years ago

converted to UTF-8 (from ASCII)

AFAIK ascii is a subset of utf8. Since this is not specified explicitly in any header, if a file is fully composed by ascii characters, we can say it is also utf8. I read about this while writing https://github.com/asrob-uc3m/tutoriales/blob/master/software/character-encoding.md (perma), so there should be more references there.

PeterBowman commented 6 years ago

See also: Should my source code be in UTF-8?. In the past, I did have to set UTF8 as default in Eclipse (when developing Java code) to avoid weird conversion errors.

jgvictores commented 6 years ago

See also: Should my source code be in UTF-8?

Nice read. Added at https://github.com/asrob-uc3m/tutoriales/commit/7c1e5cb338d56ec4161f349df2a5da48bff8d09a

In the past, I did have to set UTF8 as default in Eclipse (when developing Java code) to avoid weird conversion errors.

Well, yes. In practice, wierd things can happen with basically any editor, and can also vary among OS. UTF8 for now works well. : )