buildframework/helium/tools/quality/lint.ant.xml
author kelvzhu
Mon, 18 Oct 2010 16:16:46 +0800
changeset 655 3f65fd25dfd4
parent 645 b8d81fa19e7d
permissions -rw-r--r--
sync up SVN codes

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : lint.ant.xml 
Part of     : Helium 

Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
under the terms of the License "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<project name="lint" xmlns:hlm="http://www.nokia.com/helium"
                     xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">        
    
    <!-- Checks FTL files for lint issues. -->
    <target name="ftllint">
        <for param="file">
            <path>
                <fileset dir="${helium.dir}">
                    <include name="**/*.ftl"/>
                    <include name="**/*.rst"/>
                    <exclude name="**/*.mk.ftl"/>
                    <exclude name="build/**/*"/>
                </fileset>
            </path>
            <sequential>
                <loadfile srcfile="@{file}" property="tabs.in.ftl">
                    <filterchain>
                        <linecontainsregexp>
                            <regexp pattern="\t"/>
                        </linecontainsregexp>
                    </filterchain>
                </loadfile>
                <fail if="tabs.in.ftl" message="@{file} has tabs" />
            </sequential>
        </for>
    </target>
    
    
    <target name="hlmlint" depends="antlint,ftllint"/>
    
</project>