line endings, better handling in module directory

This commit is contained in:
Bernd Hahnebach
2019-12-19 10:46:34 +01:00
parent 228f89638d
commit 7a652357fc
6 changed files with 153 additions and 175 deletions

123
src/Mod/.gitattributes vendored
View File

@@ -1 +1,124 @@
JtReader export-ignore
# ****************************************************************************
# line endings
# to surpress line ending changes in github, add ?w=1 at link end of a diff
# for more information see forum topic and a specific 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
*.dox text
*.h text
*.json text
*.md text
*.py text
*.qrc text
*.sh 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
# line endings of the modules commented will be normalized
# AddonManager/** -text
# Arch/** -text
# Draft/** -text
# Fem/** -text
# Material/** -text
# line endings of the modules NOT commented will NOT be normalized
# Be carefully changes here could affect a lot of files automatically!
# Complete, Idf, OpenSCAD, Show, Tux makes sense to normalize
Assembly/** -text
Cam/** -text
Cloud/** -text
Complete/** -text
Drawing/** -text
Idf/** -text
Image/** -text
Import/** -text
Inspection/** -text
JtReader/** -text
Measure/** -text
Mesh/** -text
MeshPart/** -text
OpenSCAD/** -text
Part/** -text
PartDesign/** -text
Path/** -text
Plot/** -text
Points/** -text
Raytracing/** -text
ReverseEngineering/** -text
Robot/** -text
Sandbox/** -text
Ship/** -text
Show/** -text
Sketcher/** -text
Spreadsheet/** -text
Start/** -text
Surface/** -text
TechDraw/** -text
TemplatePyMod/** -text
Test/** -text
Tux/** -text
Web/** -text
# this would let git manage the file endings automatically
# to be save this will be commented
# * text=auto
# if used it is very important to set the file types
# which should not be normalized manually (like svg, jpg, etc)
# they should be set to binary
# These files should be ignored as it pertains to line-endings
# because they are binary or should be treated as binary
# Since auto normalize is deactivated all these could be commented too.
# needed if * text=auto is used
# *.FCStd binary
# *.jpg binary
# *.png binary
# *.pyc binary
# *.qm binary
# *.svg binary
# These files will always be checked out with CRLF, i.e. windows-style line endings. This
# really should not be needed...
# *.SomeWindowsFileExtensionThatReallyRequiresCRLFEvenInLinux eol=crlf
# use git to manually correct the file endings
# git add --renormalize .

View File

@@ -1,26 +0,0 @@
# for more information see forum topic and pull request
# https://github.com/FreeCAD/FreeCAD/pull/2752
# https://forum.freecadweb.org/viewtopic.php?f=17&t=41117
# get all used file types
# in a directory in a bash use
# find . -type f -name '*.*' | sed 's|.*\.||' | sort -u
# add all of them either to text or binary
# Explicitly declare which files we wish to always normalize line-endings on
# standard endings
*.csv text
*.dox text
*.py text
*.qrc text
*.sh text
*.ts text
*.txt text
*.ui text
*.yml text
# use git to manually correct the file endings
# git add --renormalize .

View File

@@ -1,29 +0,0 @@
# for more information see forum topic and pull request
# https://github.com/FreeCAD/FreeCAD/pull/2752
# https://forum.freecadweb.org/viewtopic.php?f=17&t=41117
# get all used file types
# in a directory in a bash use
# find . -type f -name '*.*' | sed 's|.*\.||' | sort -u
# add all of them either to text or binary
# Explicitly declare which files we wish to always normalize line-endings on
# standard endings
*.cpp text
*.csv text
*.dox text
*.json text
*.h text
*.py text
*.qrc text
*.sh text
*.ts text
*.txt text
*.ui text
*.yml text
# use git to manually correct the file endings
# git add --renormalize .

View File

@@ -1,28 +0,0 @@
# for more information see forum topic and pull request
# https://github.com/FreeCAD/FreeCAD/pull/2752
# https://forum.freecadweb.org/viewtopic.php?f=17&t=41117
# get all used file types
# in a directory in a bash use
# find . -type f -name '*.*' | sed 's|.*\.||' | sort -u
# add all of them either to text or binary
# Explicitly declare which files we wish to always normalize line-endings on
# standard endings
*.cpp text
*.csv text
*.dox text
*.h text
*.py text
*.qrc text
*.sh text
*.ts text
*.txt text
*.ui text
*.yml text
# use git to manually correct the file endings
# git add --renormalize .

View File

@@ -1,62 +0,0 @@
# In case people don't have core.autocrlf set, this will manage the default line-ending
# behaviour for all files recursively
# * text=auto
# to be save this will be commented
# for more information see forum topic and pull request
# https://github.com/FreeCAD/FreeCAD/pull/2752
# https://forum.freecadweb.org/viewtopic.php?f=17&t=41117
# get all used file types
# in a directory in a bash use
# find . -type f -name '*.*' | sed 's|.*\.||' | sort -u
# add all of them either to text or binary
# Explicitly declare which files we wish to always normalize line-endings on
# standard endings
*.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 endings
*.dat text
*.frd text
*.geo text
*.inp text
*.sif text
*.unv text
*.vtk text
*.z88 text
# These files will always be checked out with CRLF, i.e. windows-style line endings. This
# really should not be needed...
# *.SomeWindowsFileExtensionThatReallyRequiresCRLFEvenInLinux eol=crlf
# These files should be ignored as it pertains to line-endings, because they are binary.
# Since auto normalize is deactivated all these could be commented too.
# *.dox binary
# *.FCStd binary
# *.jpg binary
# *.png binary
# *.pyc binary
# *.qm binary
# *.svg binary
# use git to manually correct the file endings
# git add --renormalize .

View File

@@ -1,30 +1,30 @@
/** \addtogroup WORKBENCHES
Most of FreeCAD's functionality is defined in dedicated Workbenches
Those plugins, also called \b modules or \b workbenches, provide
functionality for specialized facets of FreeCAD. The word \b module
refers to any new group of tools, while \b workbench designates
specifically a GUI group of tools in the FreeCAD interface. All
workbenches are defined in modules, but not all modules contain a
workbench. Practically, though, all the main modules define a
workbench with the same name, so the terms are almost interchangeable.
Some of these modules are programmed in C++, others in Python, and some
in a mix of C++ and Python.
*/
/** \defgroup CWORKBENCHES C++ workbenches
* \ingroup WORKBENCHES
* \brief These workbenches are programmed primarily in C++, but most provide a Python API as well.
*/
/** \defgroup PYTHONWORKBENCHES Python workbenches
* \ingroup WORKBENCHES
* \brief Those are workbenches programmed primarily in Python
*/
/** \defgroup UTILITIES Utility modules
* \ingroup WORKBENCHES
* \brief Modules that provide utility tools to FreeCAD but don't define a workbench
*/
/** \addtogroup WORKBENCHES
Most of FreeCAD's functionality is defined in dedicated Workbenches
Those plugins, also called \b modules or \b workbenches, provide
functionality for specialized facets of FreeCAD. The word \b module
refers to any new group of tools, while \b workbench designates
specifically a GUI group of tools in the FreeCAD interface. All
workbenches are defined in modules, but not all modules contain a
workbench. Practically, though, all the main modules define a
workbench with the same name, so the terms are almost interchangeable.
Some of these modules are programmed in C++, others in Python, and some
in a mix of C++ and Python.
*/
/** \defgroup CWORKBENCHES C++ workbenches
* \ingroup WORKBENCHES
* \brief These workbenches are programmed primarily in C++, but most provide a Python API as well.
*/
/** \defgroup PYTHONWORKBENCHES Python workbenches
* \ingroup WORKBENCHES
* \brief Those are workbenches programmed primarily in Python
*/
/** \defgroup UTILITIES Utility modules
* \ingroup WORKBENCHES
* \brief Modules that provide utility tools to FreeCAD but don't define a workbench
*/