Re: Excluding packages from checkstyle check

"emerson cargnin" <[email protected]>
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
I still have one doubt, the file will come with the directory
structure in it? like
src/com/mycompany/package1/File.java ?

On 28/02/07, Oliver Burn <[email protected]> wrote:
> I would use a regular expression check to see if the file matched.
>
> Check out
> http://tldp.org/LDP/Bash-Beginners-Guide/html/chap_04.html
>
>
> On 2/28/07, emerson cargnin <[email protected]> wrote:
> > do you know how I would exclude using the scrip?
> >
> > On 28/02/07, Oliver Burn <[email protected]> wrote:
> > > I would just modify the script to ignore files from the packages you
> want to
> > > ignore.
> > >
> > > Otherwise I would use the Suppression Filter, see
> > > http://checkstyle.sourceforge.net/config.html#Filters
> > >
> > >
> > > On 2/28/07, emerson cargnin <[email protected]> wrote:
> > > >
> > > > Hi there, I'm using a subversion pre-commit hook and checkstyle to
> > > > check style during commit.
> > > >
> > > > Does anyone know how can i filter out some packages to not be checked?
> > > > I presume i need to change the line:
> > > > FILE=`echo $LINE | egrep \\.java$`
> > > >
> > > >
> > > > I use the following script:
> > > >
> > > > # Run checkstyle on java files
> > > > CHANGED=`$SVNLOOK changed -t "$TXN" "$REPOS" | grep -v "^D" |\
> > > >         awk '{print $2}'`
> > > > mkdir -p $TMPDIR
> > > > X=0
> > > > for LINE in $CHANGED  ; do
> > > >    FILE=`echo $LINE | egrep \\.java$`
> > > >    if [ -n "$FILE" ] ; then
> > > >        $SVNLOOK cat $REPOS --transaction $TXN $FILE >
> $TMPDIR/tmpfile.java
> > > >        $JAVA -jar $CHECKSTYLE -c $CHECKSTYLE_CONFIG
> $TMPDIR/tmpfile.java \
> > > >            > $TMPDIR/tmpfile.checkstyle
> > > >        X=$(($X + $?))
> > > >        cat $TMPDIR/tmpfile.checkstyle |\
> > > >            grep -v "^Starting audit...$\|^Audit done.$" |\
> > > >            sed -e "s@$TMPDIR/tmpfile.java@$FILE@" \
> > > >            >> $REPORT
> > > >        fi
> > > > done
> > > > if [ $X -ne 0 ] ; then
> > > >    cat $REPORT > /dev/stderr
> > > >    rm -Rf $TMPDIR
> > > >    exit 1
> > > > fi
> > > > rm -Rf $TMPDIR
> > > >
> > > >
> > >
> -------------------------------------------------------------------------
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > > your
> > > > opinions on IT & business topics through brief surveys-and earn cash
> > > >
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > _______________________________________________
> > > > Checkstyle-user mailing list
> > > > [email protected]
> > > >
> > >
> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
> > > >
> > >
> > >
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > > opinions on IT & business topics through brief surveys-and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Checkstyle-user mailing list
> > > [email protected]
> > >
> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
> > >
> > >
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Checkstyle-user mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Checkstyle-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.