Page 5 of 5

Re: PR 2730, "Fix" line-endings

Posted: Thu Dec 19, 2019 10:18 am
by bernd
it might makes sense to move the gitattributes file one directory up to the Mod dir and exclude the modules we would not normalize. Thus we would have only one gitattibutes and not one for each module.

example gitattributes would look like this: https://github.com/berndhahnebach/FreeC ... attributes

Code: Select all

# ****************************************************************************
# line endings

# for more information see forum topic and pull request
# https://forum.freecadweb.org/viewtopic.php?f=17&t=41117
# https://github.com/FreeCAD/FreeCAD/pull/2752


# get all used file types
# in a directory in a bash use
# find . -type f -name '*.*' | sed 's|.*\.||' | sort -u

# normalize the line endings of the following files

# standard files
*.bat text
*.cpp text
*.csv text
*.h text
*.md text
*.py text
*.qrc text
*.ts text
*.txt text
*.ui text
*.xml text
*.yml text

# Fem specific files
*.dat text
*.frd text
*.geo text
*.inp text
*.sif text
*.unv text
*.vtk text
*.z88 text




# exclude the following modules from normalize line endings
Assembly/** -text
Cam/** -text
Cloud/** -text
Drawing/** -text
Image/** -text
Import/** -text
Inspection/** -text
JtReader/** -text
Measure/** -text
Mesh/** -text
MeshPart/** -text
Part/** -text
PartDesign/** -text
Path/** -text
Plot/** -text
Points/** -text
Raytracing/** -text
ReverseEngineering/** -text
Robot/** -text
Sandbox/** -text
Ship/** -text
Sketcher/** -text
Spreadsheet/** -text
Start/** -text
Surface/** -text
TechDraw/** -text
TemplatePyMod/** -text
Test/** -text
Web/** -text

# they could be normalized as well, but they are not ATM
Complete/** -text
Idf/** -text
OpenSCAD/** -text

Re: PR 2730, "Fix" line-endings

Posted: Thu Dec 19, 2019 9:33 pm
by bernd
https://github.com/FreeCAD/FreeCAD/commit/5be60cf?w=1

all other module would change more than 10 file if they would normalized. As stated before the module maintainer should decide if and when line ending normalizing would be done. (IMHO)

Re: PR 2730, "Fix" line-endings

Posted: Fri Jan 03, 2020 10:25 pm
by bernd