19 Description: |
19 Description: |
20 |
20 |
21 ============================================================================ |
21 ============================================================================ |
22 --> |
22 --> |
23 <project name="lint" xmlns:hlm="http://www.nokia.com/helium" |
23 <project name="lint" xmlns:hlm="http://www.nokia.com/helium" |
24 xmlns:cs="antlib:com.puppycrawl.tools.checkstyle"> |
24 xmlns:cs="antlib:com.puppycrawl.tools.checkstyle"> |
25 |
|
26 <!-- Run AntLint on project Ant XML files. --> |
|
27 <target name="antlint"> |
|
28 <delete dir="${helium.build.dir}/jep"/> |
|
29 <delete dir="${helium.build.dir}/python"/> |
|
30 <delete dir="${helium.build.dir}/beanshell"/> |
|
31 <delete file="${helium.build.dir}/test_jython.xml"/> |
|
32 <mkdir dir="${helium.build.dir}/report/antlint" /> |
|
33 <hlm:antlint> |
|
34 <fileset dir="${helium.dir}/tools"> |
|
35 <include name="**/*.ant.xml"/> |
|
36 <include name="**/build.xml"/> |
|
37 <include name="**/*.antlib.xml"/> |
|
38 <exclude name="tests/**"/> |
|
39 <exclude name="**/test/test_*.xml"/> |
|
40 <exclude name="external/**"/> |
|
41 <exclude name="**/tests/data/**"/> |
|
42 <exclude name="build/**"/> |
|
43 </fileset> |
|
44 <hlm:checkTabCharacter severity="error" enabled="true"/> |
|
45 <hlm:checkPropertyName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\_\\.\\@\\{\\}\\$]]*)" /> |
|
46 <hlm:checkTargetName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\-]]*)" /> |
|
47 <hlm:checkIndentation severity="error" enabled="true"/> |
|
48 <hlm:checkPresetDefMacroDefName severity="warning" enabled="true" regexp="([a-z0-9][a-zA-Z0-9]*)" /> |
|
49 <hlm:checkProjectName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\.\\_\\-]]*)" /> |
|
50 <hlm:checkDescription severity="warning" enabled="true"/> |
|
51 <hlm:checkFileName severity="warning" enabled="true" regexp="^build.xml$|ant.xml$|antlib.xml$" /> |
|
52 <hlm:checkRunTarget severity="warning" enabled="true"/> |
|
53 <hlm:checkAntCall severity="warning" enabled="true"/> |
|
54 <hlm:checkScriptSize severity="warning" enabled="true"/> |
|
55 <hlm:checkUseOfIfInTargets severity="warning" enabled="true"/> |
|
56 <hlm:checkJythonScript severity="error" enabled="true" outputDir="${helium.build.dir}/jep"/> |
|
57 <hlm:checkScriptCondition severity="warning" enabled="true" outputDir="${helium.build.dir}/scriptcondition"/> |
|
58 <hlm:checkPythonTasks severity="warning" enabled="true" outputDir="${helium.build.dir}/python"/> |
|
59 <hlm:checkUseOfEqualsTask severity="warning" enabled="true"/> |
|
60 <hlm:checkScriptDefNameAttributes severity="error" enabled="true"/> |
|
61 <hlm:checkScriptDefStyle severity="warning" enabled="true"/> |
|
62 <hlm:checkScriptDef severity="error" enabled="true" outputDir="${helium.build.dir}/beanshell"/> |
|
63 <hlm:checkDuplicateNames severity="warning" enabled="true"/> |
|
64 |
|
65 <!-- Reporters --> |
|
66 <hlm:antlintCheckstyleReporter file="${helium.build.dir}/report/antlint/antlint_report.xml" /> |
|
67 <hlm:antlintConsoleReporter /> |
|
68 </hlm:antlint> |
|
69 <fileset id="jep.files" dir="${helium.build.dir}"> |
|
70 <include name="jep/**/*.py"/> |
|
71 <include name="python/**/*.py"/> |
|
72 </fileset> |
|
73 <antcall target="pylint" inheritRefs="true"> |
|
74 <reference refid="jep.files" torefid="python.files" /> |
|
75 </antcall> |
|
76 <cs:checkstyle config="${helium.dir}/builder/java/config/java_checkstyle_config.xml"> |
|
77 <fileset dir="${helium.build.dir}/beanshell" includes="**/*.java"/> |
|
78 <formatter type="plain"/> |
|
79 </cs:checkstyle> |
|
80 </target> |
|
81 |
|
82 |
25 |
83 <!-- Checks FTL files for lint issues. --> |
26 <!-- Checks FTL files for lint issues. --> |
84 <target name="ftllint"> |
27 <target name="ftllint"> |
85 <for param="file"> |
28 <for param="file"> |
86 <path> |
29 <path> |