[Japi-cvs] SF.net SVN: japi:[784] tools/archStat/trunk/src/prj/net/sf/japi/archstat/ Checker.xml
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2009-02-01 16:27:15
|
Revision: 784
http://japi.svn.sourceforge.net/japi/?rev=784&view=rev
Author: christianhujer
Date: 2009-02-01 16:27:10 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
Improved example checker configuration.
Modified Paths:
--------------
tools/archStat/trunk/src/prj/net/sf/japi/archstat/Checker.xml
Modified: tools/archStat/trunk/src/prj/net/sf/japi/archstat/Checker.xml
===================================================================
--- tools/archStat/trunk/src/prj/net/sf/japi/archstat/Checker.xml 2009-01-24 22:43:02 UTC (rev 783)
+++ tools/archStat/trunk/src/prj/net/sf/japi/archstat/Checker.xml 2009-02-01 16:27:10 UTC (rev 784)
@@ -8,65 +8,138 @@
<filetype id="Asm" groups="AsmSource AsmHeader" description="Assembly Language (Source and Header)"/>
<filetype id="Java" match="^.+\.(java)$" description="Java Source"/>
<filetype id="Jpp" match="^.+\.(jpp)$" description="Jpp Source"/>
- <filetype id="Curly" groups="C Asm Java Jpp" description="Java and Jpp Source"/>
+ <filetype id="Curly" groups="C Java Jpp" description="Curly brace language source"/>
<filetype id="Makefile" match="^(Makefile|.+\.mak)$" description="Makefile" />
+ <filetype id="All" groups="Curly Asm Makefile" description="All files" />
</filetypes>
<patterns>
<pattern
match="line"
- type="WARNING"
+ messageType="WARNING"
name="bogusLintSuppression"
- regex="/[/*] lint"
- message="Bogus lint suppression."
- />
+ regex="/[/*] +lint"
+ message="Bogus lint suppression - lint suppression with no effect."
+ filetypes="C"
+ >
+ The way the lint suppression is written causes the lint suppression to have no effect.
+ </pattern>
<pattern
match="line"
- type="WARNING"
+ messageType="WARNING"
name="trailingWhitespace"
regex="[\p{javaWhitespace}&&[^\p{Zl}]]+?(\r\n|\r|\n)$"
message="Trailing whitespace."
- />
+ filetypes="All"
+ >
+ Trailing whitespace is redundant, hinders searching and can be a cause of merge problems.
+ </pattern>
<pattern
match="line"
- type="WARNING"
+ messageType="WARNING"
name="unixLine"
regex="[^\r]\n$"
message="Unix line."
- />
+ filetypes="All"
+ >
+ Use DOS line endings only to make sure the files are editable with stanard windows editors.
+ </pattern>
<pattern
match="line"
- type="WARNING"
+ messageType="WARNING"
+ name="platformIntegerType"
+ regex="\b(char|short|int|long)\b"
+ message="Platform integer type."
+ filetypes="C"
+ >
+ You used a type of which the sign (char) or size may vary depending on the platform.
+ Instead use an ISO/IEC 9899:1999 integer type.
+ </pattern>
+ <pattern
+ match="line"
+ messageType="WARNING"
name="oldIntegerType"
regex="\b[US](08|16|32)_(EXACT|FAST)\b"
message="Old integer type."
- />
+ filetypes="C"
+ >
+ You used an old integer type.
+ Use ISO/IEC 9899:1999 integer types like uint8_t or int_fast32_t instead.
+ </pattern>
<pattern
match="line"
- type="WARNING"
+ messageType="WARNING"
name="oldBooleanType"
regex="\bBOOL(_FAST)?\b"
message="Old boolean type."
- />
+ filetypes="C"
+ >
+ You used an old boolean type.
+ Use the ISO/IEC 9899:1999 type bool instead.
+ </pattern>
<pattern
match="line"
- type="WARNING"
+ messageType="WARNING"
+ name="internalBooleanType"
+ regex="\b_Bool\b"
+ message="Internal boolean type."
+ filetypes="C"
+ >
+ You used the internal boolean type.
+ Use the ISO/IEC 9899:1999 external type bool instead.
+ </pattern>
+ <pattern
+ match="line"
+ messageType="WARNING"
name="tab"
regex="\t"
message="Tab character."
- />
+ filetypes="Curly"
+ >
+ Do not use tab for indention.
+ Use spaces instead.
+ Hint: most editors can be configured to insert spaces instead of tabs.
+ The optimum configuration for an editor is:
+ indent 4 spaces if a user uses tab,
+ align to 8 if a tab is found in a file.
+ </pattern>
<pattern
match="line"
- type="WARNING"
+ messageType="WARNING"
name="commentStart"
regex="/\*\*\s*?[\r\n]"
message="Documentation comment text doesn't start in first line of documentation comment."
- />
+ filetypes="Curly"
+ >
+ If you start a documentation comment, the text should start in the first line, not later, e.g.
+ /** Flushes the cache.
+ * ...
+ */
+ </pattern>
<pattern
match="line"
- type="WARNING"
+ messageType="WARNING"
name="oldStyleComment"
regex="(\*{3,}|/{3,})"
message="Old style comment."
+ filetypes="Curly"
/>
+ <pattern
+ match="line"
+ messageType="WARNING"
+ name="krbraces"
+ regex="^[\p{javaWhitespace}&&[^\p{Zl}]]+?(\{|else|catch|finally)"
+ message="Bogus brace style found. Use K&R brace style."
+ filetypes="Curly"
+ >
+ </pattern>
+ <!--pattern
+ match="line"
+ messageType="WARNING"
+ name="spaces"
+ regex="^ "
+ message="Bogus indention in Makefile - use tabs, not spaces."
+ filetypes="Makefile"
+ >
+ </pattern-->
</patterns>
</config>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|