diff --git a/src/Mod/Fem/codeformating.md b/src/Mod/Fem/codeformating.md index b5cd6ba15b..8cb4b4a549 100644 --- a/src/Mod/Fem/codeformating.md +++ b/src/Mod/Fem/codeformating.md @@ -1,4 +1,5 @@ # FEM coding rules +- These coding rules apply to FEM module code only. Other modules or the base system may use different coding rules especially in naming policy of Python. ## Python and C++ - All files should have a licence header @@ -13,7 +14,7 @@ - maximal line length is 100 - double quotes as string identifier - One import per line, no * imports allowed as it makes harder to validate code -- the import of FreeCADGui should be guarded by a "if FreeCAD.GuiUp:" +- the import of FreeCADGui should be guarded by a 'if FreeCAD.GuiUp:' ### Naming policy - snake_case_names @@ -24,7 +25,10 @@ ### Python code formating tools - flake8 - in source code directory on Linux shell + ''' find src/Mod/Fem/ -name "*\.py" | grep -v InitGui.py | xargs -I [] flake8 --ignore=E266,W503 --max-line-length=100 [] + ''' + - www.lgtm.com - TODO: check pylint - automatic code formater will not be used for existant code @@ -33,3 +37,10 @@ ## C++ ### Naming policy - CamelCase names + +## Spelling +- Take care on spelling. Quit often it is ignored to check for missspelling. +- codespelling could be used +''' +codespell -q 3 -L aci,aline,alledges,als,ang,beginn,behaviour,bloaded,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,currenty,doubleclick,dum,eiter,elemente,feld,freez,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ot,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,vertexes,uint,unter,whitespaces -S *.ts,*.po src/Mod/Fem +'''