mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-15 05:18:40 +00:00
Init
This commit is contained in:
parent
42b119e154
commit
f3893b123f
60
build_public.sh
Normal file
60
build_public.sh
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Include private
|
||||
. var.sh
|
||||
|
||||
# Removing unnecessary attribute quotes (only for end user release not for dev release)
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(name=")([a-zA-Z0-9\-\_]*)(")/name=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(for=")([a-zA-Z0-9\-\_]*)(")/for=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(id=")([a-zA-Z0-9\-\_]*)(")/id=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(class=")([a-zA-Z0-9\-\_]*)(")/class=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(min=")([a-zA-Z0-9\-\_]*)(")/min=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(min=")([a-zA-Z0-9\-\_]*)(")/min=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(max=")([a-zA-Z0-9\-\_]*)(")/max=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(type=")([a-zA-Z0-9\-\_]*)(")/type=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(role=")([a-zA-Z0-9\-\_]*)(")/role=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(method=")(.*)(")/method=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(action=")(.*)(")/action=\2/g'
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/(href=")(.*)(")/href=\2/g'
|
||||
|
||||
# Removing unnecessary whitespace
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e 's/ */ /g'
|
||||
|
||||
# Removing unnecessary newline
|
||||
find $ROOT_PATH -name "*tpl.php" | xargs -L1 sed -i -e ':a;N;$!ba;s/\n/ /g'
|
||||
|
||||
# Removing comments
|
||||
find $ROOT_PATH -name "*tpl.php" | sed -e :a -re 's/<!--.*?-->//g;/<!--/N;//ba'
|
||||
|
||||
# Creating release path
|
||||
rm -r -f $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
mkdir -p $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
mkdir -p $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH/jsOMS
|
||||
mkdir -p $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH/jsOMS/Utils
|
||||
|
||||
# Copying built files
|
||||
cp -R $ROOT_PATH/Admin/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp -R $ROOT_PATH/External/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp -R $ROOT_PATH/phpOMS/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp -R $ROOT_PATH/Modules/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp -R $ROOT_PATH/Model/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp -R $ROOT_PATH/cssOMS/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp -R $ROOT_PATH/Web/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp -R $ROOT_PATH/Socket/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp -R $ROOT_PATH/Console/ $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH
|
||||
cp $ROOT_PATH/jsOMS/oms.min.js $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH/jsOMS
|
||||
cp $ROOT_PATH/jsOMS/Utils/oLib.min.js $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH/jsOMS/Utils
|
||||
|
||||
# Removing dev files
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "*.scss" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "*.psd" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "*.yml" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "*.gitignore" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "*.jscsrc" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "*.php_cs" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "*.sh" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "composer.json" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "GruntFile.js" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "koala-config.json" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "package.json" -type f -delete
|
||||
find $ROOT_PATH/$RELEASE_PATH/Public/$VERSION_HASH -name "private.php" -type f -delete
|
||||
105
inspection.sh
Normal file
105
inspection.sh
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Include private
|
||||
. var.sh
|
||||
. $ROOT_PATH/private.sh
|
||||
|
||||
# Previous cleanup
|
||||
rm -r -f $ROOT_PATH/$BUILD_PATH/logs
|
||||
rm -r -f $ROOT_PATH/$BUILD_PATH/stats
|
||||
rm -r -f $ROOT_PATH/$BUILD_PATH/docs
|
||||
|
||||
# Creating directories
|
||||
mkdir -p $ROOT_PATH/$BUILD_PATH/logs
|
||||
mkdir -p $ROOT_PATH/$BUILD_PATH/stats >> $ROOT_PATH/$BUILD_PATH/logs/build.log
|
||||
mkdir -p $ROOT_PATH/$BUILD_PATH/docs >> $ROOT_PATH/$BUILD_PATH/logs/build.log
|
||||
|
||||
# Handling git
|
||||
cd $ROOT_PATH && git fetch --all && git reset --hard origin/$GIT_BRANCH && git pull >> $ROOT_PATH/$BUILD_PATH/logs/build.log
|
||||
|
||||
# Setting up database for demo and testing
|
||||
mysql -e 'drop database if exists oms;' -u root -p$DB_PASSWORD
|
||||
mysql -e 'create database oms;' -u root -p$DB_PASSWORD
|
||||
#echo "USE mysql;\nUPDATE user SET password=PASSWORD('123456') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
|
||||
|
||||
curl --connect-timeout 600 --max-time 601 $WEB_URL/Admin/Install
|
||||
|
||||
# Downloading tools
|
||||
wget -nc https://phar.phpunit.de/phploc.phar
|
||||
wget -nc https://phar.phpunit.de/phpunit.phar
|
||||
wget -nc https://github.com/Halleck45/PhpMetrics/raw/master/build/phpmetrics.phar
|
||||
wget -nc http://phpdoc.org/phpDocumentor.phar
|
||||
wget -nc http://static.pdepend.org/php/latest/pdepend.phar
|
||||
wget -nc https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
|
||||
wget -nc http://static.phpmd.org/php/latest/phpmd.phar
|
||||
wget -nc https://phar.phpunit.de/phpcpd.phar
|
||||
|
||||
# Executing unit tests
|
||||
php $ROOT_PATH/phpunit.phar --configuration $ROOT_PATH/$TEST_PATH/PHPUnit/phpunit_default.xml --coverage-text --coverage-clover $ROOT_PATH/$BUILD_PATH/logs/clover.xml > $ROOT_PATH/$BUILD_PATH/logs/phpunit.log
|
||||
|
||||
# Stats & metrics
|
||||
php $ROOT_PATH/phploc.phar $ROOT_PATH/phpOMS/ > $ROOT_PATH/$BUILD_PATH/stats/phpOMS.log
|
||||
php $ROOT_PATH/phploc.phar $ROOT_PATH/Modules/ > $ROOT_PATH/$BUILD_PATH/stats/ModulesStats.log
|
||||
|
||||
php $ROOT_PATH/phpmetrics.phar --report-html=$ROOT_PATH/$BUILD_PATH/stats/ReportFramework.html $ROOT_PATH/phpOMS/ >> $ROOT_PATH/$BUILD_PATH/logs/build.log
|
||||
php $ROOT_PATH/phpmetrics.phar --report-html=$ROOT_PATH/$BUILD_PATH/stats/ReportModules.html $ROOT_PATH/Modules/ >> $ROOT_PATH/$BUILD_PATH/logs/build.log
|
||||
|
||||
php $ROOT_PATH/pdepend.phar --summary-xml=$ROOT_PATH/$BUILD_PATH/stats/phpOMSSummary.xml --jdepend-chart=$ROOT_PATH/$BUILD_PATH/stats/phpOMSDepend.svg --overview-pyramid=$ROOT_PATH/$BUILD_PATH/stats/phpOMSPryramid.svg $ROOT_PATH/phpOMS
|
||||
php $ROOT_PATH/pdepend.phar --summary-xml=$ROOT_PATH/$BUILD_PATH/stats/modulesSummary.xml --jdepend-chart=$ROOT_PATH/$BUILD_PATH/stats/modulesDepend.svg --overview-pyramid=$ROOT_PATH/$BUILD_PATH/stats/modulesPyramid.svg $ROOT_PATH/Modules
|
||||
|
||||
# Documentation
|
||||
php $ROOT_PATH/phpDocumentor.phar -d $ROOT_PATH --ignore "*/phpOMS/Localization/*" -t $ROOT_PATH/$BUILD_PATH/docs
|
||||
|
||||
# Local inspection
|
||||
php phpcs.phar --report-file=$ROOT_PATH/$BUILD_PATH/logs/phpcsFramework.log --ignore=$ROOT_PATH/phpOMS/Localization --standard=$ROOT_PATH/$BUILD_PATH/phpcs.xml $ROOT_PATH/phpOMS
|
||||
php phpcs.phar --report-file=$ROOT_PATH/$BUILD_PATH/logs/phpcsModules.log --standard=$ROOT_PATH/$BUILD_PATH/phpcs.xml $ROOT_PATH/Modules
|
||||
#php phpmd.phar $ROOT_PATH/phpOMS xml $ROOT_PATH/$BUILD_PATH/phpmd.xml --reportfile $ROOT_PATH/$BUILD_PATH/logs/phpmdFramework.log -- bzip missing
|
||||
#php phpmd.phar $ROOT_PATH/Modules xml $ROOT_PATH/$BUILD_PATH/phpmd.xml --reportfile $ROOT_PATH/$BUILD_PATH/logs/phpmdModules.log -- bzip missing
|
||||
php phpcpd.phar $ROOT_PATH/phpOMS --exclude Localization --no-interaction > $ROOT_PATH/$BUILD_PATH/logs/phpcpdFramework.log
|
||||
php phpcpd.phar $ROOT_PATH/Modules --no-interaction > $ROOT_PATH/$BUILD_PATH/logs/phpcpdModules.log
|
||||
|
||||
# Linting
|
||||
find $ROOT_PATH/phpOMS -name "*.php" | xargs -L1 php -l > $ROOT_PATH/$BUILD_PATH/logs/temp.log
|
||||
sed '/^No syntax.*/ d' < $ROOT_PATH/$BUILD_PATH/temp.log > $ROOT_PATH/$BUILD_PATH/logs/phpLintFramework.log
|
||||
find $ROOT_PATH/Modules -name "*.php" | xargs -L1 php -l > $ROOT_PATH/$BUILD_PATH/logs/temp.log
|
||||
sed '/^No syntax.*/ d' < $ROOT_PATH/$BUILD_PATH/temp.log > $ROOT_PATH/$BUILD_PATH/logs/phpLintModules.log
|
||||
rm $ROOT_PATH/$BUILD_PATH/logs/temp.log
|
||||
|
||||
# External inspection and build
|
||||
curl -H "Content-Type: application/json" -X POST -d '{"branch":"$GIT_BRANCH","access_token":"$SCRUTINIZER_TOKEN"}' https://scrutinizer-ci.com/api/repositories/g/spl1nes/oms/inspections?access_token=$SCRUTINIZER_TOKEN
|
||||
#curl --get --data api_token=$CODECLIMATE_TOKEN https://codeclimate.com/api/repos/oms/branches/$GIT_BRANCH/refresh -- Coming in the future... right now not available for free
|
||||
#curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $TRAVIS_TOKEN" -d '{"request": {"branch":"$GIT_BRANCH"}}' https://api.travis-ci.org/repo/spl1nes%2FOrange-Management/requests
|
||||
|
||||
# Mail
|
||||
#echo "New build of branch $GIT_BRANCH from $GITHUB_URL created." | mail -s "New build" $MAIL_ADDR
|
||||
|
||||
# Html tag inspection
|
||||
TAG[0]="<\/html>"
|
||||
TAG[1]="<\/body>"
|
||||
TAG[2]="<\/head>"
|
||||
TAG[3]="<\/thead>"
|
||||
TAG[4]="<\/tbody>"
|
||||
TAG[5]="<\/tfoot>"
|
||||
TAG[6]="<\/tr>"
|
||||
TAG[7]="<\/th>"
|
||||
TAG[8]="<\/td>"
|
||||
TAG[9]="<\/option>"
|
||||
TAG[10]="<\/li>"
|
||||
TAG[11]="<br\s*\/>"
|
||||
TAG[12]="<meta.*\/>"
|
||||
TAG[13]="<input.*\/>"
|
||||
TAG[14]="<hr.*\/>"
|
||||
TAG[15]="<img.*\/>"
|
||||
TAG[16]="<link.*\/>"
|
||||
TAG[17]="<source.*\/>"
|
||||
TAG[18]="<embed.*\/>"
|
||||
|
||||
for i in "${TAG[@]}"
|
||||
do
|
||||
echo "\nInsepcting $i:\n" >> $ROOT_PATH/$BUILD_PATH/logs/htmlinspection.log
|
||||
grep -rln "$i" --include \*.tpl.php $ROOT_PATH/phpOMS >> $ROOT_PATH/$BUILD_PATH/logs/htmlinspection.log
|
||||
grep -rln "$i" --include \*.tpl.php $ROOT_PATH/Modules >> $ROOT_PATH/$BUILD_PATH/logs/htmlinspection.log
|
||||
done
|
||||
|
||||
# Find empty attributes
|
||||
grep -rln "=\"\"" --include \*.tpl.php $ROOT_PATH > $ROOT_PATH/$BUILD_PATH/logs/unusedattributes.log
|
||||
102
phpcs.xml
Normal file
102
phpcs.xml
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="oms-rulesets">
|
||||
<description>Orange Management ruleset! www.orange-management.de
|
||||
</description>
|
||||
<rule ref="Generic.Classes.DuplicateClassName"/>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
|
||||
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
|
||||
<rule ref="Generic.Files.LineEndings"/>
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
|
||||
<rule ref="Generic.Formatting.MultipleStatementAlignment"/>
|
||||
<rule ref="Generic.Formatting.SpaceAfterCast"/>
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity">
|
||||
<properties>
|
||||
<property name="complexity" value="10"/>
|
||||
<property name="absoluteComplexity" value="20"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Generic.Metrics.NestingLevel">
|
||||
<properties>
|
||||
<property name="nestingLevel" value="5"/>
|
||||
<property name="absoluteNestingLevel" value="10"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
||||
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
|
||||
<rule ref="Generic.NamingConventions.CamelCapsFunctionName"/>
|
||||
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
||||
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions"/>
|
||||
<rule ref="Generic.PHP.LowerCaseConstant"/>
|
||||
<rule ref="Generic.PHP.NoSilencedErrors"/>
|
||||
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
|
||||
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
|
||||
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
|
||||
<rule ref="MySource.PHP.EvalObjectFactory"/>
|
||||
<rule ref="MySource.PHP.GetRequestData"/>
|
||||
<rule ref="PEAR.Classes.ClassDeclaration"/>
|
||||
<rule ref="PEAR.Commenting.ClassComment"/>
|
||||
<rule ref="PEAR.Commenting.FileComment"/>
|
||||
<rule ref="PEAR.Commenting.FunctionComment"/>
|
||||
<rule ref="PEAR.Commenting.InlineComment"/>
|
||||
<rule ref="PEAR.ControlStructures.ControlSignature"/>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature"/>
|
||||
<rule ref="PEAR.Functions.ValidDefaultValue"/>
|
||||
<rule ref="PEAR.NamingConventions.ValidClassName"/>
|
||||
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent"/>
|
||||
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
|
||||
<rule ref="PEAR.WhiteSpace.ScopeIndent"/>
|
||||
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
||||
<rule ref="PSR1.Files.SideEffects"/>
|
||||
<rule ref="PSR2.Classes.ClassDeclaration"/>
|
||||
<rule ref="PSR2.Classes.PropertyDeclaration"/>
|
||||
<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
|
||||
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
|
||||
<rule ref="PSR2.ControlStructures.SwitchDeclaration"/>
|
||||
<rule ref="PSR2.Files.EndFileNewline"/>
|
||||
<rule ref="PSR2.Methods.MethodDeclaration"/>
|
||||
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
|
||||
<rule ref="PSR2.Namespaces.UseDeclaration"/>
|
||||
<rule ref="Squiz.PHP.CommentedOutCode">
|
||||
<properties>
|
||||
<property name="maxPercentage" value="30"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
|
||||
<rule ref="Squiz.PHP.DiscouragedFunctions"/>
|
||||
<rule ref="Squiz.PHP.Eval"/>
|
||||
<rule ref="Squiz.PHP.ForbiddenFunctions"/>
|
||||
<rule ref="Squiz.PHP.GlobalKeyword"/>
|
||||
<rule ref="Squiz.PHP.Heredoc"/>
|
||||
<rule ref="Squiz.PHP.InnerFunctions"/>
|
||||
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
|
||||
<rule ref="Squiz.PHP.NonExecutableCode"/>
|
||||
<rule ref="Squiz.Scope.MemberVarScope"/>
|
||||
<rule ref="Squiz.Scope.MethodScope"/>
|
||||
<rule ref="Squiz.Scope.StaticThisUsage"/>
|
||||
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace"/>
|
||||
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
|
||||
<properties>
|
||||
<property name="spacing" value="1"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.MemberVarSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.PropertyLabelSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/>
|
||||
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
|
||||
<rule ref="Zend.Files.ClosingTag"/>
|
||||
</ruleset>
|
||||
100
phpmd.xml
Normal file
100
phpmd.xml
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="oms-rulesets"
|
||||
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
|
||||
<description>Orange Management ruleset! www.orange-management.de
|
||||
</description>
|
||||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
|
||||
<properties>
|
||||
<property name="reportLevel" value="10"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/NPathComplexity">
|
||||
<properties>
|
||||
<property name="minimum" value="200"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
|
||||
<properties>
|
||||
<property name="minimum" value="100"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessiveClassLength">
|
||||
<properties>
|
||||
<property name="minimum" value="1000"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessiveParameterList">
|
||||
<properties>
|
||||
<property name="minimum" value="10"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessivePublicCount">
|
||||
<properties>
|
||||
<property name="minimum" value="45"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/TooManyFields">
|
||||
<properties>
|
||||
<property name="maxfields" value="15"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/TooManyMethods">
|
||||
<properties>
|
||||
<property name="maxmethods" value="10"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity">
|
||||
<properties>
|
||||
<property name="maximum" value="50"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/controversial.xml/Superglobals"/>
|
||||
<rule ref="rulesets/controversial.xml/CamelCaseClassName"/>
|
||||
<rule ref="rulesets/controversial.xml/CamelCasePropertyName"/>
|
||||
<rule ref="rulesets/controversial.xml/CamelCaseMethodName"/>
|
||||
<rule ref="rulesets/controversial.xml/CamelCaseParameterName"/>
|
||||
<rule ref="rulesets/controversial.xml/CamelCaseVariableName"/>
|
||||
<rule ref="rulesets/design.xml/ExitExpression"/>
|
||||
<rule ref="rulesets/design.xml/EvalExpression"/>
|
||||
<rule ref="rulesets/design.xml/GotoStatement"/>
|
||||
<rule ref="rulesets/design.xml/NumberOfChildren">
|
||||
<properties>
|
||||
<property name="minimum" value="15"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/design.xml/DepthOfInheritance">
|
||||
<properties>
|
||||
<property name="minimum" value="6"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/design.xml/CouplingBetweenObjects">
|
||||
<properties>
|
||||
<property name="minimum" value="13"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/naming.xml/ShortVariable">
|
||||
<properties>
|
||||
<property name="minimum" value="3"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/naming.xml/LongVariable">
|
||||
<properties>
|
||||
<property name="maximum" value="20"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/naming.xml/ShortMethodName">
|
||||
<properties>
|
||||
<property name="minimum" value="3"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass"/>
|
||||
<rule ref="rulesets/naming.xml/ConstantNamingConventions"/>
|
||||
<rule ref="rulesets/naming.xml/BooleanGetMethodName"/>
|
||||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
|
||||
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
|
||||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
|
||||
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>
|
||||
</ruleset>
|
||||
17
var.sh
Normal file
17
var.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Defining paths & basics
|
||||
ROOT_PATH="/var/www/html"
|
||||
BUILD_PATH="Build"
|
||||
RELEASE_PATH="Release"
|
||||
TEST_PATH="Tests"
|
||||
DB_PASSWORD="123456"
|
||||
WEB_URL="http://orange-management.de"
|
||||
MAIL_ADDR=""
|
||||
|
||||
# Git variables
|
||||
GITHUB_URL="https://github.com/spl1nes/Orange-Management.git"
|
||||
GIT_BRANCH="develop"
|
||||
|
||||
VERSION_HASH=$(git rev-parse HEAD)
|
||||
DATE=$(date +%Y-%m-%d)
|
||||
Loading…
Reference in New Issue
Block a user