78
C# Code- AssemblyInfo.cs must have AssemblyVersion attribute (Tip: Fix this in code.)
1
1
0
\[Assembly:\s*AssemblyVersion\s*\(\s*"\d+\.\d+
0
AssemblyInfo.cs
true
0
Version info must exists within AssemblyInfo
false
1
94
2003-10-20T22:54:58.907+08:00
johnliu/KOALA
2005-08-15T18:18:25.741+08:00
GaryLam/HAMSTER
http://www.ssw.com.au/ssw/CodeAuditor/
(missing)
86
C# Code- Boolean Properties must be prefixed by a verb (Tip: Change the prefix of the property name.)
1
1
0
(?six-mn:bool\s*\b(?!(?:Is|Has|Supports|Allow|Accept|Use|Visible|Available|Check|Exists|Can|Should)|(?=\b\w*ed\b)\w*)(\w+)\s*(?:\[\])?\s*\{.*?\})
0
*.cs
false
0
Boolean Properties must be prefixed by a verb Verbs like "Supports", "Allow", "Accept", "Use" should be valid. Also properties like "Visible", "Available" should be accepted (maybe not) http://www.ssw.com.au/SSW/Standards/Rules/RulestoBetterCode.aspx#BooleanPropertyNamingConventions
false
59
1270
2003-12-09T15:21:34.712+08:00
MarkLiu/SHARK
2006-07-28T15:31:12.39+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
190
C# Code- Catch and re-throw exception improperly (Tip: Fix in code.)
1
1
0
(?six-mn:
# catch statement
catch\s*
(?:
# With ExceptionName
(?:\(\s*\w+[^\s)]*\s+(?<ExceptionName>\w+)\)\s*)
|
# Without ExceptionName
(?:\(\s*\w+[^\)]*\)\s*)?
)
# catch block - open curly bracket
\{\s*
# skip all comments
(?:(?://[^\n]*|/\*.*?\*/)\s*)*
(?:
# empty catch block
|
# catch block that re-throws the exception without doing anything else
(?:throw\s*;\s*)[^\}]*
|
# Re-throw the exception by passing the original exception object
(?:[^\}]*?throw\s+\<ExceptionName>\s*;\s*)[^\}]*
)
# catch block - close curly bracket
\}
)
0
*.cs
false
0
false
59
2834
2005-05-12T17:24:15.031+08:00
RyanTee
2006-03-22T11:26:38.078+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterdotNETProjects.aspx#CatchRethrow
157
C# Code- Do you make your Catch Exceptions specific?
1
1
0
catch\s*\(\s*Exception
0
*.cs
false
0
Exception should not just catch "Exception"
For example
Bad:
Try
{
connection.Open();
}
catch( Exception ex)
{
return ex.ToString ();
}
Good:
Try
{
connection.Open();
}
catch( InvalidOperationException ex)
{
return ex.ToString ();
}
catch( SqlException ex)
{
return ex.ToString ();
}
false
59
690
2005-01-20T16:06:46.308+08:00
GaryLam/HAMSTER
2007-08-15T15:03:58.011+08:00
EvanLin/RACOON
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterdotNETProjects.aspx#Catch_Exception
53
C# Code- If statement must have braces (Tip: Add brace in code.)
1
1
0
(?sixm:
^ # begin on new line
(?<sol>[\u0020\t]*) # funny spaces
(?!//[\u0020\t]*) # ignore comments
(?<space>\b)
(
(?<if>(else\s+)?if\s*\( # match (else) if
(?>[^()]+ # greedy match everything
|
\((?<DEPTH>) # increase depth if match (
|
\)(?<-DEPTH>) # gobble depth if match )
)+(?(DEPTH)(?!)) # if depth is unbalanced - fail
\)
)
|
(?<else>else\s+(?!if)) # if match "else" - not "else if"
)
(?!\s*
(?<Comment>
(?six:
(
(\/\*
((?<star>\*\/)|\*|(?(star)(?!)|([^*/])))+
\/
)
|
//[^\n]*\n))
)*
(\s*{)
)
)
0
*.cs
false
0
Regular Expression - Find any if statements that are not followed by a curly bracket ({). Ignore statements that have been commented out.
Options: Multiline, IgnoreCase, IgnorePatternwhitespace
Ross Donald
false
0
50
743
2003-02-04T10:58:33+08:00
KOALA
2006-08-29T13:40:16+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulestoBetterCode.aspx#IfStatement
74
C# Code- No empty catch blocks (Tip: Fix in code.)
1
1
0
(?sixm:
{\s*}(?<=catch(?<a>[^{]*){\s*})
)
0
*.cs
false
0
try { } catch(Exception e) { }
try { } catch { }
false
59
699
2003-09-24T09:56:29.596+08:00
johnliu/KOALA
2005-08-16T10:29:58.468+08:00
GaryLam/HAMSTER
http://www.ssw.com.au/ssw/CodeAuditor/
169
C# Code- No empty code blocks (Tip: Fix in code.)
1
1
0
(?ix-smn:
# Empty block
{\s*}
# Ignore - constructor overloading
(?<!:\s*(?:this|base)\(.*\)\s*{\s*})
# Ignore - empty class constructor that has no parameters is OK
(?!
(?<=\s+(?<ClassName>\w+)\(\s*\)\s*{\s*}) # Get the class name
(?<=(?s:class\s+\k<ClassName> # Locate the class
(?:\s*:\s*(?:\w+\.)*\w+ # This class inherits or implements a base class or an interface
(?:\s*,\s*(?:\w+\.)*\w+)* # This class inherits or implements more than one base class or interface
| # This class doesn't inherit or implement anything
)\s*{.*))
)
# Ignore - empty partial class - this could be created by VS 2005 Dataset designer
(?<!partial\s+class\s+\w+\s*{\s*})
# Ignore - Inherited class (support Generic <T>)
(?<!:\s*(?:\w+\.)*\w+(?:\<.*\>|)\s*{\s*})
# Ignore - empty array
(?<!\[\]\s*{\s*})
# Ignore - this is a string, not empty code block
(?!
(?<="[^\n]*{\s*})
(?=[^\n]*?")
)
)
0
*.cs
false
0
Empty Visual Basic .NET procedure or Visual C# .NET method consume program resources unnecessarily.
Put comment in code block if its stub for future application.
false
59
704
2005-02-11T15:37:11.32+08:00
MarkLiu/ORCA
2007-02-08T15:14:59.062+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
161
C# Code- No hard coded connection string (Tip: Move the string to settings file.)
1
1
0
(?six-mn:
"[^"\n]*(?:Driver|Data\sSource)\s*=[^"]*"
# Ignore: This is generated by VS for Settings class
(?!
(?<=\[global::System\.Configuration\.DefaultSettingValueAttribute\("[^\n]*)
(?=[^\n]*\)\])
)
)
0
*.cs
false
0
false
59
706
2005-02-01T11:36:36.752+08:00
GaryLam/HAMSTER
2006-08-07T15:53:11.078+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterdotNETProjects.aspx#HardCode
101
C# Code- No variable name with the same class name (Tip: Change the variable name.)
1
1
0
(?mix-sn:
# Match for ClassName className
(?:^|\.)(?<1>\w+)\s+\1(?:\s*)(?:;|=.*?;)
# Ignore Inline Comment //
(?<!//.*)
)
0
*.cs
false
0
Variable name should not be the same as class name.
Bad Example:
Array array = new Array();
Good Example:
Array objects = new Array();
false
59
747
2004-03-17T18:03:34.644+08:00
MarkLiu/SHARK
2005-12-21T22:29:15.843+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
123
C# Code- SQL stored procedure names should be prefixed with the owner (dbo) (Tip: Fix in Sql server and then Code.)
1
1
0
SqlCommand\s+(\w+)(?=.*?\1\.CommandType\s*=\s*CommandType.StoredProcedure).+?\1\.CommandText\s*=\s*"(?!dbo\.)
0
*.cs
false
0
If a stored procedure name is not prefixed by the owner, SQL server will look for a procedure with that name for the current user first. This causes a performance hit.
false
0
59
677
2004-10-16T19:35:56+08:00
EdwardForgacs/CAT
2005-08-03T12:16:31.655+08:00
RamPrasad/RAM
http://www.ssw.com.au/SSW/Standards/Rules/RulestoBetterCode.aspx#PrefixProcName
202
C# Code- Static constructor must be Protected (Tip: Add 'protected' for static constructor in code.)
1
1
0
(?sixn-m:
# Match Class/Struct
(class|struct)\s+
# Match Class name
(?<ClassName>\w+)\s*
# Match Inheritance stuff
(?<Inherit>:[\s\w\.\,]*)?\s*
{
(.*(?<Result>public\s*static\s*\k<ClassName>\()|.*(?<Result>static\s*public\s*\k<ClassName>\())
)
0
*.cs
false
0
false
50
1195
2005-07-05T09:21:54.758+08:00
garylam/BADGER
2005-08-03T12:19:11.482+08:00
RamPrasad/RAM
138
C# Code- String should be @-quoted instead of using escape character for "\\" (Tip: Fix in code)
1
1
0
(?six-mn:
# Find \\
\\\\
# Ignore: Already @-quoted
(?<!
@(?:"[^"]*?")*(?:"[^"]*?\\\\)
)
# Ignore: This is a character, not string
(?<!(?:,|\(|{|=)\s*'\\\\)
(?!(?='\s*:)(?<=(?:\)\s*{|:|;)\s*case\s*'\\\\)) # switch case
# Ignore: This is generated by VS Designer - not necessary to change it
(?!
(?<=\#region\s*Windows\s*Form\s*Designer\s*generated\s*code.*?private\s*void\s*InitializeComponent\(\)\s*\{.*?\\\\)
(?=.*?\}\s*\#endregion)
)
# Ignore: This is generated by VS for Settings class
(?!
(?<=\[global::System\.Configuration\.DefaultSettingValueAttribute\("[^\n]*)
(?=[^\n]*"\)\])
)
)
0
*.cs
false
0
Good:
string path = @"C:\Program Files\SSW Code Auditor";
Bad:
string path = "C:\\Program Files\\SSW Code Auditor";
false
0
59
710
2004-10-17T12:51:54+08:00
EdwardForgacs/CAT
2006-08-04T13:45:50.921+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
170
C# Code- Structs and Classes member accessibility must be declared (Tip: Fix in code.)
1
1
0
(?sixn-m:
# Match Class/Struct
(class|struct)\s+
# Match Class name
(?<ClassName>\w+)\s*
# Match Inheritance stuff
(?<Inherit>:[\s\w\.\,]*)?\s*
{
(?>
(?(Brace)
# Ignore matches in child bracers
([^{}]+)
|
# Match things in class bracer
(
# Skip whitespaces
\s+
|
# Skip comment block
/\*((?!\*/).)*\*/
|
# Skip compile directive and comment block
(\#|//)
[^\n]*\n
|
# Skip Attributes
\[
[^{}\]]+\]
|
# Skip Semi colon
;
|
# Skip lines with member accessbility
(static\s*|new\s*)*(public|private|protected|internal|static\s+\k<ClassName>)
([^{};]+(?({\d})[^;]*);?)
|
# Match lines without member accessibility
(?<Result>[^{};]+(?({\d})[^;]*);?)
)+
)
|
# Add child bracer to stack
{(?<Brace>)
|
# Remove child bracer from stack
}(?<-Brace>)
)*
# Child Bracer must be empty
(?(Brace)(?!))
}
(?(Result)|(?!))
)
0
*.cs
false
0
Not explicitly specifying the access type for members of a structure or class can be deceiving for other developers that are using this structure or class.
The default structure and class members access in Visual C# .NET is always private. The default class member access in Visual Basic .NET is private. However, the default structure member access in Visual Basic .NET is public.
Note: current regular expression cannot check embedded classes.
false
55
878
2005-02-11T15:38:17.033+08:00
MarkLiu/ORCA
2006-03-16T08:40:20.093+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBettercode.aspx#ClassAccess
183
C# UI & Code- Button Height - Standard Button must be 23 pixels height (Tip: Fix in designer.)
2
1
0
(?six-mn:
# Match button
\WButton\s+(\w+);
# Look-forward for button's size
(?=
# Skip junk character
.+?
\1\.Size\s*=\s*new\s*(?:System\.Drawing\.)?Size\s*\((?(\d*\s*,\s*[2][3]\s*)(?!)|(?<Result>[^)]*))\)
)
)
0
*.cs
false
0
Button should be in 23 pixels height.
false
10
680
2005-04-28T14:08:50.932+08:00
GaryLam/HAMSTER
2005-04-28T14:08:50.932+08:00
GaryLam/HAMSTER
http://www.ssw.com.au/ssw/CodeAuditor/
166
C# UI & Code- Button Height and Width - for Ellipsis button (27 x 23) pixels (Tip: Fix in designer.)
2
1
0
(?six-mn:
\WButton\s+(\w+);(?=.+?\1\.Text\s*=\s*[^;]+"\.\.\."\s*;).+?\1\.Size\s*=\s*new\s*(?<Result>System\.Drawing\.)?Size\s*(?(\(\s*[2][7]\s*,\s*[2][3]\s*\))(?!)|([^;]*;))
)
0
*.cs
false
0
Please make the size to (27,23).
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterWindowsForms.aspx#CommonControl
false
50
836
2005-02-03T18:45:47.849+08:00
GaryLam/HAMSTER
2005-08-03T12:09:54.476+08:00
RamPrasad/RAM
http://www.ssw.com.au/ssw/CodeAuditor/
195
C# UI & Code- Variable must follow .NET naming standard (Tip: Fix in designer.)
1
1
0
(?six-mn:
############
# WinForm Button
############
(?:friend|private|protected|public|shared|function)
\s+(?:System.Windows.Forms.Button\s+
(?(btn\w+)
(?!)
|(?<Result>\w+)
)\s*;
)
|
############
# WinForm List Box
############
(?:friend|private|protected|public|shared|function)
\s+(?:System.Windows.Forms.ListBox\s+
(?(lst\w+)
(?!)
|(?<Result>\w+)
)\s*;
)
|
############
# WinForm Label
############
(?:friend|private|protected|public|shared|function)
\s+(?:System.Windows.Forms.Label\s+
(?(lbl\w+)
(?!)
|(?<Result>\w+)
)\s*;
)
# Check whether this label is being used
# Ignore all code in the Windows Form Designer generated code region
(?=.*\#region\sWindows\sForm\sDesigner\sgenerated\scode
.*
\#endregion
.*
# This label is being used, it needs to be named correctly
\1\..+;)
|
############
# WinForm TextBox
############
(?:friend|private|protected|public|shared|function)
\s+(?:System.Windows.Forms.TextBox\s+
(?(txt\w+)
(?!)
|(?<Result>\w+)
)\s*;
)
|
############
# WinForm ComboBox
############
(?:friend|private|protected|public|shared|function)
\s+(?:System.Windows.Forms.ComboBox\s+
(?(cbo\w+)
(?!)
|(?<Result>\w+)
)\s*;
)
######################
# Custom standard may add to here
######################
)
0
*.cs
false
0
Here is our recommended prefix to use in Win Forms UI
User Interface Prefix
====================
Button btn
Label lbl
TextBox txt
ComboBox cbo
ListBox lst
false
59
740
2005-06-01T19:02:05.027+08:00
GaryLam/HAMSTER
2005-12-21T22:30:54.843+08:00
RyanTee
http://www.ssw.com.au/SSW/Standards/DeveloperDotNet/DotNetStandard_ObjectNaming.aspx
192
C# UI- Do not use ComboBox for users to select Boolean type values (Tip: Fix in designer.)
2
1
0
(?xsi-mn:
this\.(\w+)\.Items\.AddRange\(new\sobject\[\]\s*\{\s*
(?:
\"Enabled\"\,\s*\"Disabled\" |
\"Enable\"\,\s*\"Disable\" |
\"True\",\s*\"False\" |
\"Yes\",\s*\"No\" |
\"On\",\s*\"Off\"
)
\s*\}\);
(?<=
this\.\1\s=\snew\sSystem\.Windows\.Forms\.ComboBox\(\)\;.*
)
)
0
*.cs
false
0
Don't use ComboBox for users to select Boolean type values
Use a single CheckBox instead, see Rule URL for more information.
false
59
676
2005-05-13T18:16:03.484+08:00
RyanTee
2005-08-03T12:11:08.767+08:00
RamPrasad/RAM
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx#UseCheckBox
140
C# UI- MonthCalendar must not have ShowToday or ShowTodayCircle set to false (Tip: Fix in designer.)
2
1
0
MonthCalendar\s+(\w+).+?\1\.ShowToday(?:Circle)?\s*=\s*false
0
*.cs
false
0
false
0
59
678
2004-10-23T15:07:07+08:00
EdwardForgacs/CAT
2005-08-03T12:12:04.135+08:00
RamPrasad/RAM
http://www.ssw.com.au/ssw/CodeAuditor/
289
C#/VB.NET - Use resource file to store messages
0
0
0
(?sixm:
".+?"
|
'.+?'
)
0
*.cs;*.vb
false
0
false
331
5840
2007-08-10T16:42:36.701+08:00
BriteCheng/SHEEP
2007-08-10T16:46:41.621+08:00
BriteCheng/SHEEP
http://www.ssw.com.au/ssw/standards/rules/rulestobettercode.aspx#StoreMessage
221
C#/VB.NET Code - Assembly minor version should start with 11
1
0
0
(?six: (\[|\<)Assembly:\s*AssemblyVersion\s*\(\s*"\d+\.(?<Result>10|[0][0-9]|[0-9])\.)
0
*.cs;*.vb
false
0
In .NET, it removes any 0 in the prefix and so e.g. _v1-02 becomes _v1-2. The rather contrived solution is to start minor versions at 11. Therefore _v1-11.exe is your first version.
false
57
2289
2005-08-16T15:52:09.327+08:00
GaryLam/HAMSTER
2006-07-27T13:21:47.703+08:00
RyanTee
http://www.ssw.com.au/ssw/standards/Rules/RulestoBetterCode.aspx#SetupFileName
275
C#/VB.NET Code - Constants should not be in upper case
1
0
0
(?x-i:
# C#:
const\s+\w+\s+[A-Z]{3,}[^a-z]*?\s
|
# VB .NET:
Const\s+[A-Z]{3,}[^a-z]*\s
)
0
*.cs; *.vb
false
0
false
57
723
2006-12-14T13:29:45.764+08:00
ericphan/ORCA
2007-01-29T11:28:25.328+08:00
RyanTee
296
C#/VB.NET Code - Environment.NewLine is always at the end of the line
0
0
0
(?sixm:
(?<a>Environment\.NewLine\+?[^\n]+\w+)
)
0
*.cs;*.vb
false
0
Bad Example:
str = "aaa" + Environment.Newline + "bbb";
Good Example:
str = "aaa" + Environment.NewLine +
"bbb";
false
10
671
2008-04-21T16:17:22.983+08:00
BillChen/DEER
2008-04-22T12:08:21.134+08:00
BillChen/DEER
http://www.ssw.com.au/ssw/standards/Rules/RulestoBetterCode.aspx#Environment
303
C#/VB.NET Code – Button or LinkLabel should always has a clicked event handler
0
0
2
using System;
using SSW.CodeAuditor.Business;
using SSW.CodeAuditor.Business.Rules;
using SSW.CodeAuditor.Business.Targets;
using System.Text.RegularExpressions;
using System.IO;
public class MyRule : IRuleSnippet
{
public void Check(ITarget target, TargetCollection targets, RuleResult result)
{
string pattern = @"(?sixn-m:
(?:this|Me)?\.(?<ButtonName>\w+)\s+=\s+New\s+System\.Windows\.Forms\.Button
(?!.*\k<ButtonName>\.Click\s+\+=\s+.*)
(?!.*\s+Handles\s+.*\k<ButtonName>\.Click)
|
(?:this|Me)?\.(?<LinkLabelName>\w+)\s+=\s+New\s+System\.Windows\.Forms\.LinkLabel
(?!.*\k<LinkLabelName>\.((LinkClicked\s+\+)|(Tag\s+))=\s+.*)(?!.*\s+Handles\s+\k<LinkLabelName>\.LinkClicked)
)";
if (target.FileExtension.Equals(".cs", StringComparison.CurrentCultureIgnoreCase))
{
string formFile = Path.GetDirectoryName(target.FilePath) + @"\" + target.FileName.Replace("Designer.cs", "vb");
if (File.Exists(formFile))
{
StreamReader sr = new StreamReader(formFile);
target.TextContent += sr.ReadToEnd();
sr.Close();
}
}
string content = target.TextContent;
foreach (Match match in Regex.Matches(content,pattern))
{
result.LineNumbers.Add(new LineObject(match.Captures[0].Index));
}
if (result.LineNumbers.Count > 0)
{
result.ResultCode = RuleResultCode.Failed;
}
else
{
result.ResultCode = RuleResultCode.Passed;
}
}
}
4
*.Designer.vb;*.Designer.cs
false
0
This rule can check missing of such event handler made by accident
false
5
453
2008-08-11T18:22:22.187+08:00
BillChen/WOLF
2008-08-11T18:23:05.969+08:00
BillChen/WOLF
http://www.ssw.com.au/ssw/standards/rules/rulestobettercode.aspx#CheckButtonEventHandler
269
C#/VB.NET Code- Application entry method should handle "UnhandledException" and "ThreadException" events
1
0
0
(?six-mn:
(?:
# ---------- <C#> ----------
# Application entry method
\[STAThread\]\s+
(?:(?:public|private|static)\s+){1,2}(?:void|int)\s+Main\((?:string\[\]\s+\w*|)\)\s*
(?=\{.*?Application\.Run\([^;]*;.*?\})
(?:
# AppDomain.CurrentDomain.UnhandledException
(?!(?<=AppDomain\.CurrentDomain.*\.UnhandledException\s*\+=\s*new\s+UnhandledExceptionEventHandler\([^)]*\)\s*;.*)
|(?=.*AppDomain\.CurrentDomain.*\.UnhandledException\s*\+=\s*new\s+UnhandledExceptionEventHandler\([^)]*\)\s*;))
|
# Application.ThreadExceptions
(?!(?<=Application\.ThreadException\s*\+=\s*new\s*(?:System\.Threading\.|)ThreadExceptionEventHandler\([^)]*\)\s*;.*)
|(?=.*Application\.ThreadException\s*\+=\s*new\s*(?:System\.Threading\.|)ThreadExceptionEventHandler\([^)]*\)\s*;))
)
# ---------- </C#> ----------
|
# ---------- <VB .NET> ----------
# Application entry method
(?:(?<IsShared>Shared\s+)|)(?:Sub|Function)\s+Main\((?:ByVal\s+\w*\(\)\s+As\s+String|)\)(?:\s+As\s+Integer|)
(?(IsShared)|(?<=Module\s+\w+.*)(?=.*End\s+Module))
(?=.*?Application\.Run\([^)]*\).*?
End\s+Sub)
(?:
# AppDomain.CurrentDomain.UnhandledException
(?!(?<=AddHandler\s+.*?\.UnhandledException(?<=AppDomain\.CurrentDomain.*?),\s+AddressOf\s+[^\s]*.*)
|(?=.*AddHandler\s+.*?\.UnhandledException(?<=AppDomain\.CurrentDomain.*?),\s+AddressOf\s+[^\s]*))
|
# Application.ThreadExceptions
(?!(?<=AddHandler\s+Application\.ThreadException,\s+AddressOf\s+[^\s]*.*)
|(?=.*AddHandler\s+Application\.ThreadException,\s+AddressOf\s+[^\s]*))
)
# ---------- </VB .NET> ----------
)
)
0
*.cs;*.vb
false
0
Good:
C#: (Both must exist)
1) AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
2) Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
VB .NET: (Both must exist)
1) AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf OnUnhandledException
2) AddHandler Application.ThreadException, AddressOf OnThreadException
false
57
752
2006-08-03T16:58:39.671+08:00
RyanTee
2006-08-04T11:17:16.843+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterdotNETProjects.aspx#EMAB
260
C#/VB.NET Code- Don't ignore Cross-Thread warning with CheckForIllegalCrossThreadCalls = false
2
0
2
\bCheckForIllegalCrossThreadCalls\s*=\s*false\b
0
*.cs;*.vb
false
0
If you use multithreading to improve the performance your Windows Forms applications, you must be careful to make calls to your controls in a thread-safe way.
Please refer to http://msdn2.microsoft.com/en-US/library/ms171728.aspx for the article "How to: Make Thread-Safe Calls to Windows Forms Controls".
false
57
678
2006-04-11T13:30:04.687+08:00
RyanTee
2006-04-11T13:33:50.703+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor
273
C#/VB.NET Code- Don't throw System.Exception
1
0
0
(?six-mn:
throw\snew\s(?:System\.|)Exception\s*\(
)
0
*.cs;*.vb
false
0
If you throw an exception with the code "throw Exception()", what you need subsequently to handle the exception will be the infamous "catch (Exception ex)".
false
57
691
2006-09-28T11:43:53.046+08:00
RyanTee
2006-10-02T16:45:39.921+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterdotNETProjects.aspx#DoNotThrowSystemException
281
C#/VB.NET Code- Enum types should not be suffixed with the word "Enum"
1
0
0
(?ix-smn:
\w*\senum\s.*\w*Enum\W
)
0
*.cs; *.vb
false
0
This is against the .NET Object Naming Conventions and inconsistent with the framework.
false
70
1279
2007-02-07T14:48:13.531+08:00
RyanTee
2007-02-07T14:54:06.671+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulestoBetterCode.aspx#DontSuffixEnum
135
C#/VB.NET Code- Exception variables should be called ex (Tip: Fix in code.)
1
0
0
(?six-mn:
(?:
catch\s*\(\s*(?:\w+\.)*\w+\s+(?!ex\))\w+\) # C#
# Ignore it if this is a DataSet, you can't fix it because the code will be regenerated:
(?<!public\s+(?:partial\s+|)class\s+\w+\s*\:\s*(?:System\.Data\.|)DataSet.*)
|
Catch\s+(?!ex\s+)\w+\s+As\s+(?:\w+\.)*\w+ # VB
# Ignore it if this is a DataSet, you can't fix it because the code will be regenerated:
(?<!(?:Partial\s+|)Public\s+Class\s+\w+\s+Inherits\s+(?:System\.Data\.|)DataSet.*)
)
)
0
*.cs; *.vb
false
0
We have an exception allowing "e" for generated datasets, because there is no point changing generated code from Microsoft – even if it is wrong!
false
0
70
712
2004-10-17T12:32:35+08:00
EdwardForgacs/CAT
2006-07-21T21:43:36.781+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulestoBetterCode.aspx#nameex
145
C#/VB.NET Code- Message box title must be the application's product name and version only (Tip: Fix in code.)
2
0
0
(?six-mn:
MessageBox.Show\((?:\s_|)
(?:
(?!
# Skip 1 or 2 parameters (as few as possible) as the MessageBox's title is only either the 2nd or 3rd parameter
([^\^;]+?,(?:\s_|)(?:\s*)){1,2}
(Application\.ProductName\s*\+\s*"\s"\s*\+\s*new\s*Version\(Application\.ProductVersion\)\.ToString\(2\))
[^\)]*?\)
)
|(?!)
)
)
0
*.cs;*.vb
false
0
We just provide one way to create ProductName and Version number in the title of message boxes.
Version Number Format:
XX.XX
Sample:
MessageBox.Show(this, sMessage, Application.ProductName + " " + new Version(Application.ProductVersion).ToString(2))
false
0
70
702
2004-10-30T12:05:10+08:00
EdwardForgacs/CAT
2006-03-07T14:45:42.125+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
146
C#/VB.NET Code- MessageBoxIcon.Question should not be used (Tip: Fix in code.)
2
0
0
(?six-mn:
MessageBoxIcon\.Question
(?=\s*(?:\)|,))
(?<=
\bMessageBox\.Show\("
.*?\s*,(?:\s_|)(?:\s*)
MessageBoxButtons\.\w+\s*,(?:\s_|)(?:\s*)
MessageBoxIcon\.Question
)
)
0
*.cs;*.vb
false
0
MessageBox.Question has been deprecated by Microsoft and exists for backward compatibility purposes only. See http://www.ssw.com.au/ssw/standards/rules/rulestobetterinterfaces.aspx#MessageBoxGuidelines and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch09f.asp for more information.
false
0
70
689
2004-10-30T12:54:36+08:00
EdwardForgacs/CAT
2006-03-23T08:53:03.609+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx#MessageBoxGuidelines
117
C#/VB.NET Code- MessageBoxes must have icons (Tip: Fix in code.)
2
0
0
(?six-mn:
MessageBox\.Show\s*
# Bracket must be used, otherwise cannot determine when MessageBox ends
\(
# Match argument inside MessageBox.Show
(
(?:
# Add the ( to stack s
(?<s>\()|
# Pop the last ( from stack s
(?<-s>\))|
# If stack s is empty, this is the argument for MessageBox.Show
# If stack s is not empty, this is argument for another function
# Only check for MessageBoxIcon if stack s is empty.
(?(s)|(?!MessageBoxIcon))[^()]
)*
)
# Make sure all bracket are closed
(?(s)(?!))
# Match the ending bracket for MessageBox.Show
\)
)
0
*.cs;*.vb
false
0
false
0
70
692
2004-10-16T15:10:11+08:00
EdwardForgacs/CAT
2005-09-07T14:02:22.617+08:00
GaryLam/HAMSTER
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx#MessageBoxGuidelines
162
C#/VB.NET Code- Never return "", Use String.Empty (Tip: Fix in code.)
1
0
0
(?six:
return\s*(?<!\\)""
)
0
*.cs;*.vb
false
0
We use String.Empty for consistency and easier to read.
false
70
691
2005-02-01T12:30:58.979+08:00
GaryLam/HAMSTER
2005-08-03T12:22:18.124+08:00
RamPrasad/RAM
http://www.ssw.com.au/SSW/Standards/Rules/RulestoBetterCode.aspx#StringEmpty
178
C#/VB.NET Code- Should have Regenerate.bat for data access layer and store procs (Tip: Fix in code.)
1
0
0
_regenerate.bat
0
*data*.csproj;*data*.vbproj
true
0
A _Regenerate.bat file must exist under the solution items to recreate data access layer and stored procs.
false
0
0
2005-04-11T16:39:10.898+08:00
GaryLam/HAMSTER
2005-08-30T15:36:46.565+08:00
GaryLam/HAMSTER
http://www.ssw.com.au/SSW/Standards/Rules/Rulestobetterwindowsforms.aspx#CodeGenerators
(missing)
277
C#/VB.NET Code- Unit test classes should be suffixed "Tests"
1
0
0
(?six-mn:
(?:
# C# NUnit [TestFixture] class without "Tests" suffix
\[TestFixture\]
(?!\s+public\s+class\s+\w+Tests\W)
|
# VB .NET NUnit [TestFixture] class without "Tests" suffix
<TestFixture\(\)>
(?!(?:\s_|)\s+Public\sClass\s\w+Tests\W)
)
)
0
*.cs;*.vb
false
0
Unit test classes should be suffixed with the word "Tests" for better coding readability.
false
57
723
2007-02-06T12:19:55.468+08:00
RyanTee
2007-02-06T12:57:05.562+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulestoBetterCode.aspx#UnitTestSuffix
163
C#/VB.NET Project- Release with Debug Info to assist debugging (Tip: Fix in project's properties)
1
0
0
(?six-mn:
#VS 2005
(<PropertyGroup\sCondition=.[^>]*(?=Release)
.*?
<DebugType>pdbonly</DebugType>
.*?
</PropertyGroup>)
|
#VS 2003
(\<Config[^>]*(?=Name\s*=\s*"Release")[^>]*DebugSymbols\s*=\s*"\s*true\s*")
)
0
*.csproj;*.vbproj
true
0
Warning: Some developers may not want to do this rule because they care about their intellectual property and telling them to release with Debug Symbol is not justified.
false
6
138
2005-02-02T12:30:31.795+08:00
GaryLam/HAMSTER
2006-01-31T19:17:37.353+08:00
RyanTee/PITBULL
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterdotNETProjects.aspx#Release
(settings error)
271
C#/VB.NET Solution- Solution should have both "References" and "Setup" solution folders
2
0
0
(?six-mn:
# This regex should only matches VS 2005 solution
^\s*Microsoft\sVisual\sStudio\sSolution\sFile,\sFormat\sVersion\s9.00
(?:
(?:.*?Project\("{[^}]*}"\)\s=\s"(?<FolderName>References|Setup)",\s"\k<FolderName>",\s"{[^}]*}"
\s*(?:ProjectSection\(SolutionItems\)\s=\spreProject|EndProject)){2}
|
# Ignore - Solution doesn't have any solution items
(?!.*Project\("{[^}]*}"\)\s=\s"(?<FolderName>(?!References|Setup).*?)",\s"\k<FolderName>",\s"{[^}]*}"
\s*ProjectSection\(SolutionItems\)\s=\spreProject)
)
)
0
*.sln
true
0
false
6
202
2006-08-11T14:33:49.843+08:00
RyanTee
2006-08-14T11:25:49.406+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterdotNETProjects.aspx#StructuredSolutionFolders
105
C#/VB.NET UI & Code- AcceptButton must be called "OK" (Tip: Fix in designer)
2
0
0
(?six-mn:
# Find the AcceptButton
(?:Me|this)\.AcceptButton\s*=\s*(?:Me|this)\.(?<AcceptButton>\w+)\b
# Check the button.text must be "OK"
(?:
(?:(?=.*\1\.(?<Result>Text)\s*=\s*\"(?!(?:OK)\"))|
(?<=\1\.(?<Result>Text)\s*=\s*\"(?!(?:OK)\").*))
)
)
0
*.cs;*.vb
false
0
We suggested every form have button should have Accept and Cancel button, which is convenience for user to press "enter" and "esc" keys. And for consistency within the programme we suggested to use the same name of all the Accept and cancel button. Here we choose Ok and Cancel.
false
70
733
2004-05-19T09:42:44.537+08:00
JoeHardy/BEE
2007-02-13T16:16:01.296+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/rulestobetterwindowsforms.aspx#ACCBTN
108
C#/VB.NET UI & Code- Buttons (except OK, Cancel, and Close), CheckBoxes, RadioButtons must have mnemonics (Tip: Fix in designer.)
2
0
0
(?six-mn:
# Look for any button/checkbox/radio button
(?:
Friend\s+WithEvents\s+(?<Control>\w+)\s+As\s+(?:System\.Windows\.Forms\.)?(?:Button|CheckBox|RadioButton)
|
\W(?:System\.Windows\.Forms\.)?(?:Button|CheckBox|RadioButton)\s+(?<Control>\w+)\s*\;
)
(?:
(?=.*(?<Result>\b\k<Control>.Text\s*=\s*"(?!(?:OK|Cancel|Close|\.\.\.))[^&"]+"))
|
(?<=(?<Result>\b\k<Control>.Text\s*=\s*"(?!(?:OK|Cancel|Close|\.\.\.))[^&"]+").*)
)
)
0
*.cs; *.vb
false
0
false
70
1514
2004-06-11T10:32:31.563+08:00
JoeHardy/BEE
2007-02-09T14:40:32.64+08:00
RyanTee
http://www.ssw.com.au/SSW/Standards/Rules/RulestoBetterInterfaces.aspx#UseMnemonic
106
C#/VB.NET UI & Code- CancelButton must be called "Cancel" or "Close" (Tip: Fix in designer)
2
0
0
(?six-mn:
# Find the CancelButton
(?:Me|this)\.CancelButton\s*=\s*(?:Me|this)\.(?<CancelButton>\w+)\b
# Check the button.text must be "Cancel" or "Close"
(?:
(?:(?=.*\1\.(?<Result>Text)\s*=\s*\"(?!(?:Cancel|Close)\"))|
(?<=\1\.(?<Result>Text)\s*=\s*\"(?!(?:Cancel|Close)\").*))
)
)
0
*.cs;*.vb
false
0
We suggested every form have button should have Accept and Cancel button, which is convenience for user to press "enter" and "esc" keys. And for consistency within the programme we suggested to use the same name of all the Accept and cancel button. Here we choose Ok and Cancel.
false
70
688
2004-05-19T09:49:36.589+08:00
JoeHardy/BEE
2007-02-13T16:16:50.25+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/rulestobetterwindowsforms.aspx#ACCBTN
122
C#/VB.NET UI & Code- OK, Cancel and Close buttons should not have mnemonics (Tip: Fix in designer/code).
2
0
0
((?:this)?\.\w+\.Text\s=\s"(?:&OK|&Ok|&Cancel|&Close)")
0
*.cs;*.vb
false
0
false
0
70
755
2004-10-16T19:32:46+08:00
EdwardForgacs/CAT
2005-10-05T09:51:16.28+08:00
GaryLam/HAMSTER
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx#UseMnemonic
61
C#/VB.NET UI & Code- Ok is not OK (Tip: Fix in designer)
1
0
0
(?-i:\b(?:O|o)k\b)
0
*.cs;*.vb;*.js
false
0
(?-i:(?:O|o)k)
This rule requires the Case-Insensitive to be turned off.
false
70
722
2003-09-16T15:26:35.166+08:00
johnliu/KOALA
2005-08-03T12:23:00.059+08:00
RamPrasad/RAM
http://www.ssw.com.au/ssw/CodeAuditor/
232
C#/VB.NET UI & Code- TextBox's MultiLine Property-If it is true ,AcceptsReturn should be True
2
0
0
(?six-mn:
(?:this)?\.(?<txtName>(\w+))\s+=\s+New\s+System\.windows\.Forms\.TextBox
(?=.*\k<txtName>\.Multiline\s+ =\s+True)
(?!.*\k<txtName>\.AcceptsReturn\s+ =\s+True)
(?!.*\k<txtName>\.ReadOnly\s+ =\s+True)
.*(?<Result>\k<txtName>\.Multiline\s+ =\s+True)
)
0
*.cs;*.vb
false
0
If Textbox's Multiline is true and acceptsReturn property is true,
then user can press enter to go next line
false
57
907
2005-11-02T12:01:35.65+08:00
mathyvijay/GREENGUM
2005-11-24T12:17:06.175+08:00
mathyvijay/GREENGUM
http://www.ssw.com.au/ssw/CodeAuditor/
171
C#/VB.NET UI & Code- Windows form name should not start with frm (Tip: Fix in designer)
2
0
0
frm[^.]*\.
0
*.csproj;*.vbproj
false
0
For example: Every form named frmXXX should be called XXXForm
false
6
66
2005-03-02T15:19:00.814+08:00
GaryLam/HAMSTER
2006-02-07T13:48:49.298+08:00
RyanTee/PITBULL
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterdotNETProjects.aspx#MEANINGFULNAMES
297
C#/VB.NET UI - Set row select mode as "FullRowSelect" for DataGridView if it is read only
2
0
0
using System;
using System.Text;
using System.Text.RegularExpressions;
using SSW.CodeAuditor.Business.Targets;
using SSW.CodeAuditor.Business;
using SSW.CodeAuditor.Business.Rules;
public class MyRule : IRuleSnippet
{
public void Check(ITarget currentTarget, TargetCollection targets, RuleResult result)
{
string getControlRegex = @"(?six-mn:
# Find GridDataView
(?:this|Me)\.(?<control>\w+)\s=\s*new\s*(?:System\.Windows\.Forms\.|)DataGridView(?:\(\);|)
# Get the GridDataView with ReadOnly attribute
(?:
(?:(?=.*(?:Me|this)\.\k<control>\.(?<ReadOnly>ReadOnly)\s*=\s*true)|
(?<=(?:Me|this)\.\k<control>\.(?<ReadOnly>ReadOnly)\s*=\s*true))
)
)";
string getFullRowSelectRegex = @"(?six-mn:
#Check the GridDataView if to be setted FullRowSelect attribute
(?:
(?:(?=(?:Me|this)\.$\.SelectionMode\s*=\s*(?:System\.Windows\.Forms\.|)DataGridViewSelectionMode\.FullRowSelect)|
(?<=(?:Me|this)\.$\.SelectionMode\s*=\s*(?:System\.Windows\.Forms\.|)DataGridViewSelectionMode\.FullRowSelect))
)
)";
string content = currentTarget.TextContent;
foreach (Match regexMatch in Regex.Matches(content, getControlRegex))
{
string controlName = regexMatch.Groups["control"].Value;
string fullRowSelectRegex = getFullRowSelectRegex.Replace("$", controlName);
if (Regex.Match(content, fullRowSelectRegex).Success == false)
{
result.LineNumbers.Add(new LineObject(regexMatch.Groups["ReadOnly"].Index));
}
}
if (result.LineNumbers.Count > 0)
{
result.ResultCode = RuleResultCode.Failed;
}
else
{
result.ResultCode = RuleResultCode.Passed;
}
}
}
4
*.cs;*.vb
false
0
If you use the DataGridView control that is read only, you had better set row select mode as "FullRowSelect", becaue if the data can not be modified we can let users select all row instead of one colume.
false
10
778
2008-04-24T16:27:37.268+08:00
BillChen/DEER
2008-12-02T15:08:05.577+08:00
BillChen/SWAN
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx#FullRowSelect
120
C#/VB.NET UI- "OK" button should be set as form's AcceptButton (Tip: Fix in designer)
2
0
0
(?xsi-mn:
# Look for control with text = "OK"
#(\w+)\.(\w+).Text\s=\s\"(OK|[&Next]{4,5}\s\>)\" -- 30/1/2007 Updated to only look for "OK" button, this rule doesn't apply to Wizard form's "Next >" button
(\w+)\.(\w+).Text\s=\s\"(OK)\"
# Check whether the control is a button
(?<=\1\.\2\s=\snew\sSystem\.Windows\.Forms\.Button.*)
# Check whether form has AcceptButton, if not then the button should be set as AcceptButton
(?:(?!.*\1\.AcceptButton\s=\s)
|(?!))
# Look for a "ClientSize" property to make sure this is a WinForm and not a UserControl
(?=.*this.ClientSize)
)
0
*.cs;*.vb
false
0
If you have a OK button, you should set it as form's AcceptButton.
false
0
70
1308
2004-10-16T19:14:17+08:00
EdwardForgacs/CAT
2007-01-30T13:33:23.453+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
264
C#/VB.NET UI- Button Height and Width - for Standard Button (75 x 23) pixels (Tip: Fix in designer.)
2
0
0
using System;
using SSW.CodeAuditor.Business;
using SSW.CodeAuditor.Business.Rules;
using SSW.CodeAuditor.Business.Targets;
using System.Text.RegularExpressions;
public class MyRule : IRuleSnippet
{
public void Check(ITarget currentTarget, TargetCollection targets, RuleResult result)
{
string standardButtonRegex = @"\b(?:Add|Edit|Delete|OK|Close|Cancel|Save|Browse|Select|Test|<\sBack|Next\s>|Remove|Refresh)\b";
string getButtonTextRegex = @"(?six-mn:
# Find Buttons
(?:this|Me)\.(\w+)\s=\snew\s(?:System\.Windows\.Forms\.|)Button(?:\(\);|)
# Get buttons that size not = 75, 23
(?:
(?:(?=.*(?:Me|this)\.\1\.(?<Size>Size)\s*=\s*New\s+(?:System\.Drawing\.)Size\((?!75,\s*23).*?\))|
(?<=(?:Me|this)\.\1\.(?<Size>Size)\s*=\s*New\s+(?:System\.Drawing\.)Size\.\((?!75,\s*23).*?\).*))
)
# Get the text
(?:
(?:(?=.*?(?-s:(?:Me|this)\.\1\.Text\s*=\s*\""(?<Text>.*)\""))|
(?<=(?-s:(?:Me|this)\.\1\.Text\s*=\s*\""(?<Text>.*)\"").*?))
)
)";
string content = currentTarget.TextContent;
foreach (Match regexMatch in Regex.Matches(content, getButtonTextRegex))
{
// Remove ellipsis: ...
string buttonTextWithoutEllipsis = regexMatch.Groups["Text"].Value.Replace("...", "");
// Remove mnemonic: &
string buttonTextWithoutMnemonic = Regex.Replace(buttonTextWithoutEllipsis, "&([^&])", "$1");
if (Regex.Match(buttonTextWithoutMnemonic, standardButtonRegex, RegexOptions.IgnoreCase).Success)
{
result.LineNumbers.Add(new LineObject(regexMatch.Groups["Size"].Index));
}
}
if (result.LineNumbers.Count > 0)
{
result.ResultCode = RuleResultCode.Failed;
}
else
{
result.ResultCode = RuleResultCode.Passed;
}
}
}
4
*.cs;*.vb
false
0
These are the standard buttons naming list:
* Add
* Delete
* Edit
* OK
* Close
* Cancel
* Save
* Browse
* Select
* Test
* Next >
* < Back
* Refresh
* Remove
false
57
5737
2006-06-13T13:24:26.64+08:00
RyanTee
2006-06-13T16:00:37.218+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterWindowsForms.aspx#CommonControl
121
C#/VB.NET UI- Cancel button should be set as form's CancelButton (Tip: Fix in designer)
2
0
0
(?xsi-mn:
# Look for control with text = "Cancel"
(\w+)\.(\w+).Text\s=\s\"Cancel\"
# Check whether the control is a button
(?<=\1\.\2\s=\snew\sSystem\.Windows\.Forms\.Button.*)
# Check whether form has CancelButton, if not then the button should be set as CancelButton
(?:(?!.*\1\.CancelButton\s=\s)
|(?!))
# This rule doesn't apply to Wizard form, check whether this winform has a "< Back" button (Wizard form should have this button)
(?:
(?!
(?:(?<=(\w+)\.(\w+).Text\s=\s\"<\s[&Back]{4,5}\".*)|(?=.*(\w+)\.(\w+).Text\s=\s\"<\s[&Back]{4,5}\")
(?<=(?:\3\.\4|\5\.\6)\s=\snew\sSystem\.Windows\.Forms\.Button.*))
)|(?!)
)
# Look for a "ClientSize" property to make sure this is a WinForm and not a UserControl
(?=.*this.ClientSize)
)
0
*.cs;*.vb
false
0
If you have a Cancel button, you should set it as form's CancelButton.
false
0
70
1336
2004-10-16T19:31:37+08:00
EdwardForgacs/CAT
2007-01-30T13:32:56.875+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
259
C#/VB.NET UI- DateTimePicker's size should be (200, 21) for Long date display format or (94, 21) for Short date display format
2
0
0
(?six-mn:
# Look for DateTimePicker
(?:
Friend\s+WithEvents\s+(?<Control>\w+)\s+As\s+(?:System\.Windows\.Forms\.)?DateTimePicker
|
\W(?:System\.Windows\.Forms\.)?DateTimePicker\s+(?<Control>\w+)\s*\;
)
(?:
# DateTimePicker's size will vary by font - check this DateTimePicker is using Tahoma 8.25
(?:(?=.*?(?:\.|\b)\1\.Font\s*=\s*new\s*(?:System\.Drawing\.|)Font\("Tahoma",\s*8\.25(?:F|!),\s*(?:System\.Drawing\.|)FontStyle\.Regular)
|(?<=(?:\.|\b)\1\.Font\s*=\s*new\s*(?:System\.Drawing\.|)Font\("Tahoma",\s*8\.25(?:F|!),\s*(?:System\.Drawing\.|)FontStyle\.Regular.*?))
|
# or
# Condition 1: The Winform or UserControl that contains this DateTimePicker is using Tahoma 8.25
# + Condition 2: DateTimePicker isn't using a different font other than Tahoma 8.25
# Checks Condition 1:
(?:(?=.*?(?:this|Me)\.Font\s*=\s*new\s*(?:System\.Drawing\.|)Font\("Tahoma",\s*8\.25(?:F|!),\s*(?:System\.Drawing\.|)FontStyle\.Regular)
|(?<=(?:this|Me)\.Font\s*=\s*new\s*(?:System\.Drawing\.|)Font\("Tahoma",\s*8\.25(?:F|!),\s*(?:System\.Drawing\.|)FontStyle\.Regular.*?))
# Checks Condition 2:
(?!
(?:(?=.*?(?:\.|\b)\1\.Font\s*=\s*new\s*(?:System\.Drawing\.|)Font\((?!"Tahoma",\s*8\.25(?:F|!),\s*(?:System\.Drawing\.|)FontStyle\.Regular))
|(?<=(?:\.|\b)\1\.Font\s*=\s*new\s*(?:System\.Drawing\.|)Font\((?!"Tahoma",\s*8\.25(?:F|!),\s*(?:System\.Drawing\.|)FontStyle\.Regular).*?))
)
)
(?:
# ----- Long -----
# DateTimePickerFormat.Long
(?!
(?:(?=.*?(?:\.|\b)\1.Format\s*=\s*(?:System\.Windows\.Forms\.|)DateTimePickerFormat\.(?!Long))
|(?<=(?:\.|\b)\1.Format\s*=\s*(?:System\.Windows\.Forms\.|)DateTimePickerFormat\.(?!Long).*))
)
# Size not = 200, 21
(?:(?=.*?(?:\.|\b)\1.Size\s*=\s*new\s*(?:System\.Drawing\.|)Size\((?!200,\s*21)[^\)]*\))
|(?<=(?:\.|\b)\1.Size\s*=\s*new\s*(?:System\.Drawing\.|)Size\((?!200,\s*21)[^\)]*\).*))
# ----- Long -----
|
# ----- Short -----
# DateTimePickerFormat.Short
(?:(?=.*?(?:\.|\b)\1.Format\s*=\s*(?:System\.Windows\.Forms\.|)DateTimePickerFormat\.(?:\[|)Short(?:\]|))
|(?<=(?:\.|\b)\1.Format\s*=\s*(?:System\.Windows\.Forms\.|)DateTimePickerFormat\.(?:\[|)Short(?:\]|).*?))
# Size not = 94, 21
(?!
(?:(?=.*?(?:\.|\b)\1.Size\s*=\s*new\s*(?:System\.Drawing\.|)Size\(94,\s*21\))
|(?<=(?:\.|\b)\1.Size\s*=\s*new\s*(?:System\.Drawing\.|)Size\(94,\s*21\).*?))
)
# ----- Short -----
)
# Capture the size value in a regex group named "Result" for Code Auditor
(?:(?=.*(?:\.|\b)\1.Size\s*=\s*new\s*(?:System\.Drawing\.|)Size\((?<Result>[^\)]*)\))|(?<=(?:\.|\b)\1.Size\s*=\s*new\s*(?:System\.Drawing\.|)Size\((?<Result>[^\)]*)\).*)|)
)
0
*.cs;*.vb
false
0
The size of DateTimePicker should be (200, 21) for Long date display format or (94, 21) for Short date display format.
* This only applies to DateTimePicker that uses the font "Tahoma 8.25".
false
57
859
2006-03-20T08:28:02.593+08:00
RyanTee
2006-05-11T09:28:48+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterWindowsForms.aspx#CommonControl
231
C#/VB.NET UI- Don't use a button for "Select All"
2
0
0
(?xsi-mn:
# Look for control with text = "Select All"
(\w+)\.(\w+).Text\s=\s\"Select\sAll\"
# Check whether the control is a button
(?<=\1\.\2\s=\snew\sSystem\.Windows\.Forms\.Button.*)
)
0
*.cs;*.vb
false
0
false
57
1354
2005-10-04T21:23:48.956+08:00
RyanTee/BADGER
2005-10-04T21:24:13.122+08:00
RyanTee/BADGER
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx#SelectAll
103
C#/VB.NET UI- Don't use listboxes (Tip: Fix in designer)
2
0
0
System\.Windows\.Forms\.ListBox
0
*.cs;*.vb
false
0
false
70
674
2004-04-30T09:54:35.468+08:00
JoeHardy/SLUG
2006-04-07T10:01:33.656+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx#ListBoxesAreEvil
112
C#/VB.NET UI- FixedDialog must be used with CenterParent (Tip: Fix in designer.)
2
0
0
(?six-mn:
(?:
# Find FixedDialog
(?:Me|this)\.FormBorderStyle\s*=\s*(?:System.Windows.Forms.)FormBorderStyle\.FixedDialog
# If FixedDialog is found, CenterParent must be found too
(?:(?=.*(?:Me|this)\.StartPosition\s*=\s*(?:System.Windows.Forms.)FormStartPosition.(?!CenterParent))|
(?<=(?:Me|this)\.StartPosition\s*=\s*(?:System.Windows.Forms.)FormStartPosition.(?!CenterParent).*))
)
)
0
*.cs;*.vb
false
0
false
57
726
2004-08-24T18:26:45.779+08:00
EdwardForgacs/BEE
2007-02-22T14:37:03.75+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
130
C#/VB.NET UI- FixedSingle must be used with CenterScreen (Tip: Fix in designer.)
2
0
0
(?six-mn:
(?:
# Find FixedSingle
(?:Me|this)\.FormBorderStyle\s*=\s*(?:System.Windows.Forms.)FormBorderStyle\.FixedSingle
# If FixedSingle is found, CenterScreen must be found too
(?:(?=.*(?:Me|this)\.StartPosition\s*=\s*(?:System.Windows.Forms.)FormStartPosition.(?!CenterScreen))|
(?<=(?:Me|this)\.StartPosition\s*=\s*(?:System.Windows.Forms.)FormStartPosition.(?!CenterScreen).*))
)
)
0
*.cs;*.vb
false
0
false
0
57
728
2004-10-17T11:17:27+08:00
EdwardForgacs/CAT
2007-02-22T14:38:36.921+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
114
C#/VB.NET UI- Forms should use Tahoma 8.25 Font, Header use Verdana 12 Font (Tip: Fix in designer – select Font, right click and click ‘Reset’).
2
0
0
(?sixn-m:
# Matching Font Property. I.e, "Font = "
(this|Me)\.Font\s*=\s*
# Matching Font Constructor. I.e, "new System.Drawing.Font("
new\s+(System\.Drawing\.)?Font\s*\(\s*
# Matching Font constructor arguments
(?!"Tahoma"\s*,\s*8.25[F!]) # Don't match Tahoma 8.25F It is valid Form Font
(?!"Verdana"\s*,\s*12[F!]) # Don't match Verdana 12F Is valid Header Font
)
0
*.cs;*.vb
false
0
As per "Design Specifications and Guidelines - Visual Design"
http://msdn.microsoft.com/library/en-us/dnwue/html/ch14d.asp?frame=true
For the proper header please read this.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/propsheet/wizards.asp
false
0
70
707
2004-05-20T16:52:11+08:00
MarkLiu/SHARK
2005-08-03T12:21:43.508+08:00
RamPrasad/RAM
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterInterfaces.aspx#Font
142
C#/VB.NET UI- MonthCalendar FirstDayOfWeek must be Monday (Tip: Fix in designer.)
2
0
0
(?six-mn:
# Find MonthCalendar
(?:this|Me)\.(\w+)\s=\snew\s(?:System\.Windows\.Forms\.|)MonthCalendar(?:\(\);|)
# FirstDayOfWeek must be Monday
(?!
(?:(?=.*(?:Me|this)\.\1\.(?<Result>FirstDayOfWeek)\s*=\s*(?:System\.Windows\.Forms\.)Day\.Monday)|
(?<=(?:Me|this)\.\1\.(?<Result>FirstDayOfWeek)\s*=\s*(?:System\.Windows\.Forms\.)Day\.Monday.*))
)
)
0
*.cs
false
0
false
0
59
723
2004-10-23T15:08:14+08:00
EdwardForgacs/CAT
2006-06-13T16:32:56+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
118
C#/VB.NET UI- TextAlign should be TopLeft or MiddleLeft (Tip: Fix in designer)
2
0
0
(?six-mn:
# Find Label and TextBox
(?:this|Me)\.(\w+)\s=\snew\s(?:System\.Windows\.Forms\.|)(?:Label|TextBox)(?:\(\);|)
# Find control with TextAlign not set to TopLeft or MiddleLeft
(?:(?=.*(?:Me|this)\.\1\.(?<Result>TextAlign)\s*=\s*(?:System\.Drawing\.)ContentAlignment\.(?!TopLeft|MiddleLeft))|
(?<=(?:Me|this)\.\1\.(?<Result>TextAlign)\s*=\s*(?:System\.Drawing\.)ContentAlignment\.(?!TopLeft|MiddleLeft).*))
# If this Label control has an image, the TextAlign can be something else other than TopLeft and MiddleLeft
(?!
(?:(?=.*(?:Me|this)\.\1\.Image\s*=\s*)|
(?<=(?:Me|this)\.\1\.Image\s*=\s*.*))
)
)
0
*.cs;*.vb
false
0
false
0
70
1093
2004-10-16T16:44:00+08:00
EdwardForgacs/CAT
2006-06-13T16:25:33+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
254
C#/VB.NET UI- TextBox's PasswordChar must be *
2
0
0
(?six-mn:
(?<TextBoxName>\w+)\.PasswordChar\s*=\s
(?!
\'\*\'
|
(?:Global\.|)(?:Microsoft\.VisualBasic\.|)ChrW\(42\)
)
(?<=(?:\.|\b)\k<TextBoxName>\s*=\s*new\s+(?:System\.Windows\.Forms\.|)TextBox(?:\(\)|).*)
)
0
*.cs; *.vb
false
0
false
57
1019
2006-01-30T16:06:33.671+08:00
RyanTee
2006-03-25T18:42:42.531+08:00
RyanTee
299
C#/VB.NET UI- Windows Form should have a minimum size (Tip: Fix in designer)
2
0
0
(this|me)\.MinimumSize
0
*.Designer.cs
true
0
If windows form does not setup a minimum size, user could have unpredictable form behavior, for example, user could stretch the form to a point that can't see any controls.
false
5
339
2008-06-04T16:44:38.522+08:00
BillChen/DEER
2008-06-05T09:55:10.699+08:00
BillChen/DEER
http://www.ssw.com.au/SSW/Standards/Rules/RulestoBetterInterfaces.aspx#minisize
93
C#/VB.NET UI- Windows applications must have a MainForm or WizardPage (Tip: Fix in designer)
2
0
0
(<Settings[^>]*OutputType\s*=\s*"WinExe"[^>]*>)(?=(?(<File\s*RelPath\s*=\s*"([^"]*MainForm|[^"]*WizardPage|Startup).cs"\s*SubType\s*=\s*"Form|UserControl"(?(/>)(?!)|.)*/>)(?!)|.)*\Z)
0
*.csproj
false
0
All Windows Forms projects should have a main form named MainForm, unless they are a Wizard, in which case they should have a Wizard Template page named WizardPage.
If you project doesn't contain any Forms.
The file contains main function should call Startup.cs
See http://www.ssw.com.au/SSW/Standards/DeveloperDotNet/DotNetStandard_ObjectNaming.aspx for more information.
false
5
67
2003-12-11T12:42:16.476+08:00
MarkLiu/SHARK
2005-08-03T12:24:02.705+08:00
RamPrasad/RAM
http://www.ssw.com.au/ssw/CodeAuditor/
268
C#/VB.NET UI- Winform should have its own icon instead of using the default .NET application icon (Tip: Fix in designer)
2
0
0
using System;
using SSW.CodeAuditor.Business;
using SSW.CodeAuditor.Business.Rules;
using SSW.CodeAuditor.Business.Targets;
using System.Text.RegularExpressions;
public class MyRule : IRuleSnippet
{
public void Check(ITarget currentTarget, TargetCollection targets, RuleResult result)
{
string csRegex = @"(?six-mn:
# C# Winform
public\s+(?:partial\s+|)class\s+(?<Form>\w+)\s*:(?>\s*)(?((?<Inherit>(?:System\.Windows\.Forms\.|(?<=using\s+System\.Windows\.Forms;.*?))Form))
# If it inherits System.Windows.Forms.Form, it should have icon
(?!.*this\.Icon\s*=\s*\(\((?:System\.Drawing\.|)Icon\)\(resources\.GetObject\(""\$this\.Icon""\)\)\);)
|
# else it should not have icon
(?=.*this\.Icon\s*=\s*\(\((?:System\.Drawing\.|)Icon\)\(resources\.GetObject\(""\$this\.Icon""\)\)\);)
)
)";
string vbRegex = @"(?six-mn:
# VB .NET Winform
(?:Public|Partial)\sClass\s(?<Form>\w+)\s*Inherits\s(?((?<Inherit>(?:System\.Windows\.Forms\.|(?<=Imports\s+System\.Windows\.Forms.*?))Form))
# If it inherits System.Windows.Forms.Form, it should have icon
(?!.*Me\.Icon\s=\sCtype\(resources.GetObject\(""\$this\.Icon""\),\s(?:System\.Drawing\.|)Icon\))
|
# else it should not have icon
(?=.*Me\.Icon\s=\sCtype\(resources.GetObject\(""\$this\.Icon""\),\s(?:System\.Drawing\.|)Icon\))
)
)";
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append(currentTarget.TextContent);
string regexToRun;
if (currentTarget.FileName.EndsWith(".cs"))
{
// C# 2005
string designClassPath = currentTarget.FilePath.Insert(currentTarget.FilePath.Length - 3, ".Designer");
if (System.IO.File.Exists(designClassPath))
{
sb.Append(System.IO.File.ReadAllText(designClassPath));
}
regexToRun = csRegex;
}
else
{
regexToRun = vbRegex;
}
Match regexMatch = Regex.Match(sb.ToString(), regexToRun);
if (regexMatch.Success)
{
if (regexMatch.Groups["Inherit"].Length != 0)
{
result.Notes = "This form should have its own icon.";
}
else
{
result.Notes = "This form should not have its own icon.";
}
result.ResultCode = RuleResultCode.Failed;
}
else
{
result.ResultCode = RuleResultCode.Passed;
}
}
}
4
*.cs; *.vb
false
0
* A winform that inherits System.Windows.Forms.Form should have its own icon instead of using the default icon, this is usually the corporate base winform class.
* Other winforms that inherit the customized base winform (not System.Windows.Forms.Form) should not have its own icon, the icon should be inherited from the base winform for consistent icon.
false
57
4543
2006-07-25T16:56:38.468+08:00
RyanTee
2006-07-25T17:19:08.328+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterWindowsForms.aspx#InheritedForms
104
C#/VB.NET UI- Winform size is too big for a system with 800x600 screen resolution and with default XP theme (Tip: Fix in designer)
2
0
0
(?six-mn:
(?:
# Check width
(?:this|Me)\.ClientSize\s*=\s*new\s*(?:System\.Drawing|)\.Size\(
(?:
# If FormBorderStyle = FixedSingle or Dialog
(?=.*(?:this|Me)\.FormBorderStyle\s*=\s*(?:System\.Windows\.Forms\.|)FormBorderStyle\.(?:FixedSingle|FixedDialog))
# ClientSize width must not over794
(?:79[5-9]||[8-9]\d{2}|\d{4})\D
|
# If FormBorderStyle = Sizable
(?:(?!.*(?:this|Me)\.FormBorderStyle\s*=\s*)|(?=.*\.FormBorderStyle\s*=\s*(?:System\.Windows\.Forms\.|)FormBorderStyle\.Sizable))
# ClientSize width must not over792
(?:79[3-9]||[8-9]\d{2}|\d{4})\D
)
|
# Check height
(?:this|Me)\.ClientSize\s*=\s*new\s*(?:System\.Drawing|)\.Size\(\d*,\s
(?:
# If FormBorderStyle = FixedSingle or Dialog
(?=.*(?:this|Me)\.FormBorderStyle\s*=\s*(?:System\.Windows\.Forms\.|)FormBorderStyle\.(?:FixedSingle|FixedDialog))
# ClientSize height must not over 568
(?:569|5[7-9]\d|[6-9]\d{2}|\d{4})\D
|
# If FormBorderStyle = Sizable
(?:(?!.*(?:this|Me)\.FormBorderStyle\s*=\s*)|(?=.*\.FormBorderStyle\s*=\s*(?:System\.Windows\.Forms\.|)FormBorderStyle\.Sizable))
# ClientSize height must not over 566
(?:56[7-9]|5[7-9]\d|[6-9]\d{2}|\d{4})\D
)
)
)
0
*.cs,*.vb
false
0
If FormBorderStyle is FixedSingle or FixedDiaglog, the ClientSize must not exceed 794, 568.
If FormBorderStyle is Sizable, the ClientSize must not exceed 792, 566.
false
70
790
2006-03-25T17:38:33+08:00
RyanTee
2006-03-25T17:45:07.531+08:00
RyanTee
http://www.ssw.com.au/SSW/Standards/Rules/RulestoBetterInterfaces.aspx#Resolutions
288
Database Project - Scripts should be stored in the standard folders and with standard name
0
0
0
using System;
using SSW.CodeAuditor.Business;
using SSW.CodeAuditor.Business.Rules;
using SSW.CodeAuditor.Business.Targets;
using System.Text.RegularExpressions;
public class MyRule : IRuleSnippet
{
public void Check(ITarget primaryTarget, TargetCollection targets, RuleResult result)
{
string filePath = primaryTarget.FilePath;
filePath = filePath.Replace("/", @"\");
string folderName = filePath.Remove(filePath.LastIndexOf(@"\"));
folderName = folderName.Substring(folderName.LastIndexOf(@"\") + 1);
string fileName = primaryTarget.FileName;
string folderRegex = @"Change Scripts|Create Scripts|Queries|Auto-Generated Stored Procedures";
string fileRegex = @"\d{3,4}\w+";
if (Regex.IsMatch(folderName, folderRegex))
{
if (Regex.IsMatch(fileName, fileRegex))
{
//result.ResultCode = RuleResultCode.Passed;
result.ResultCode = RuleResultCode.Failed;
}
else
{
result.ResultCode = RuleResultCode.Failed;
result.Notes = "SQL File name should start with 4 numbers.";
}
}
else
{
result.ResultCode = RuleResultCode.Failed;
result.Notes = "Folder name is not standard.";
}
}
}
4
*.sql
false
0
Every change to the database should be scripted out.
The scripts should be stored in four standard folders:Change Scripts|Create Scripts|Queries|Auto-Generated Stored Procedures
The script file format should be: <version>_<description>.sql
The <version> should be a number which is padded with leading zeros (0) on the right to firm 3 or 4 digits.
false
292
150722
2007-08-10T16:29:00.055+08:00
BriteCheng/SHEEP
2007-08-13T15:47:37.668+08:00
BriteCheng/SHEEP
http://www.ssw.com.au/ssw/standards/Rules/RulestoBetterSQLServerdatabases.aspx#ScriptOutChanges
5
FILE - .BMP files must not exist (Tip: Move the bmp file or convert it to gif/jpg.)
0
0
0
.*\.bmp
0
*.bmp
false
1
false
0
0
0
2002-03-05T00:00:00+08:00
HIPPO
2006-03-25T18:11:44.421+08:00
RyanTee
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterWebsitesGraphics.aspx#ImagesBmp
156
FILE - Always include setup file in Setup folder (Tip: add setup file in ..\Setup\.)
0
0
0
(?simx:
setup(?:/|\\)[^.]*\. # match everything up to the .
(?:(?(wsi\s*|wse\s*)
(?'WsiShouldExists'[a-zA-Z]*) # wse or wsi file should exists
|(?!))) # Fail
)
0
*.wsi;*.wse
true
1
We should always have the setup files in the setup folder.
Forexample: we are using wise installer, so that we need to have a *.wse or *.wsi file in setup folder
false
0
0
2005-01-19T16:49:34.211+08:00
GaryLam/HAMSTER
2005-08-03T11:15:01.606+08:00
GaryLam/HAMSTER
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterdotNETProjects.aspx#SETUP
49
FILE - BAK files must not exist (Tip: Remove bak file.)
0
0
0
.*\.bak
0
*.bak
false
1
false
0
0
0
2003-11-02T18:13:17+08:00
HIPPO
2003-06-18T11:04:25.056+08:00
KOALA
http://www.ssw.com.au/ssw/CodeAuditor/
155
FILE - Images folder must contain image files only. (Tip: Move non image files to other folder)
0
0
0
(?imsx-n:
# Find "Images" folder
(?:/|\\)Images(?:/|\\).*\.
# Known image file extensions
(?!.*(?:ico|gif|jpg|jpeg|png|bmp|scc|db|psd|ai|eps|tif|pdf|swf|fla|ttf|snp|mzv|ttf)$)
)
0
*.*
false
1
Scan for all folders called "Images" and make sure they don't have another file type other then (gif|jpg|png|bmp).
User may add custom image type to the regex.
false
235
179319
2005-01-19T14:16:38.003+08:00
GaryLam/HAMSTER
2006-05-11T09:35:20+08:00
RyanTee
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterdotNETProjects.aspx#IMG
45
FILE - Images should be in the images directory (Tip: Create an image folder and put this file in)
0
0
0
(?six-mn:
.*images(/|\\).*\.(gif|jpg|jpeg|tiff|ico|png|bmp)
)
0
*.gif;*.jpg;*.png;*.bmp
true
1
http://www.ssw.com.au/SSW/Methodology/RulestoBetterWebsites.aspx#WebsiteStructure
false
0
19
163
2003-01-28T15:23:01+08:00
HIPPO
2005-06-24T16:20:54.348+08:00
GaryLam/HAMSTER
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterdotNETProjects.aspx#IMG
(not in folder)
22
FILE - zz-ed files must not exist (Tip: Remove this file.)
0
0
0
.*(\\|\/)zz.*\..*
0
*zz*.*
false
1
At SSW we prefix zz to files we no longer think we need, before we actually delete them.
false
0
0
0
2002-11-06T16:30:13+08:00
HIPPO
2003-03-03T16:26:37.341+08:00
NUMBAT
http://www.ssw.com.au/ssw/CodeAuditor/
293
Reporting Services - Reports should have standard footer
0
0
0
using System;
using SSW.CodeAuditor.Business;
using SSW.CodeAuditor.Business.Rules;
using SSW.CodeAuditor.Business.Targets;
using System.Text.RegularExpressions;
public class MyRule : IRuleSnippet
{
public void Check(ITarget primaryTarget, TargetCollection targets, RuleResult result)
{
string content = primaryTarget.TextContent;
bool isValid = false;
bool hasExTime , hasUser , hasPage , hasCompany , hasSlogan ;
hasExTime = hasUser = hasPage = hasCompany = hasSlogan = false;
RegexOptions regOptions = RegexOptions.IgnoreCase | RegexOptions.Multiline;
Regex regFooter = new Regex(@"<PageFooter>(\n|.)+</PageFooter>", regOptions);
Regex regTextbox = new Regex(@"<Textbox\s+Name=""[^>]+"">(\n|.)+?</TextBox>", regOptions);
Regex regAction = new Regex(@"<Action>(\n|.)+?</Action>",regOptions);
Regex regExecutionTime = new Regex(@"=""Execution Time\: """, regOptions);
Regex regUser = new Regex(@""" Printed by "" \+ User\!UserID \+ "" on "" \+ Globals\!ExecutionTime\.ToString\(\)", regOptions);
Regex regPage = new Regex(@"=""Page "" \+ Globals\!PageNumber\.ToString\(\) \+ "" of "" \+ Globals\!TotalPages\.ToString\(\)", regOptions);
Regex regCompany = new Regex(@"<Value>[\w- ./?%&=]*</Value>", regOptions);
Regex regCompanyLink = new Regex(@"<Hyperlink>[a-zA-z]+:/{0,2}[\w- ./?%&=]*</Hyperlink>", regOptions);
Regex regSlogan = new Regex(@"<Value>[\w\s""]+</Value>", regOptions);
Match mFooter = regFooter.Match(content);
MatchCollection mcTextbox = regTextbox.Matches(mFooter.Value);
foreach (Match textbox in mcTextbox)
{
if(regExecutionTime.IsMatch(textbox.Value))
{
hasExTime = true;
continue;
}
if (regUser.IsMatch(textbox.Value))
{
hasUser = true;
continue;
}
if (regPage.IsMatch(textbox.Value))
{
hasPage = true;
continue;
}
if (regCompany.IsMatch(textbox.Value))
{
if (regAction.IsMatch(textbox.Value))
{
if (regCompanyLink.IsMatch(textbox.Value))
{
hasCompany = true;
continue;
}
}
}
if (regSlogan.IsMatch(textbox.Value))
{
hasSlogan = true;
continue;
}
}
isValid = hasCompany & hasExTime & hasPage & hasSlogan & hasUser;
if (isValid)
{
result.ResultCode = RuleResultCode.Passed;
}
else
{
result.ResultCode = RuleResultCode.Failed;
result.Notes = "The footer is not standard.";
if (!hasCompany)
result.Notes += "Lack of Company info.";
else if(!hasExTime)
result.Notes += "Lack of Execute Time.";
else if (!hasPage)
result.Notes += "Lack of Page info.";
else if (!hasSlogan)
result.Notes += "Lack of Slogan.";
else if (!hasUser)
result.Notes += "Lack of User info.";
}
}
}
4
*.rdl
false
0
false
36
14797
2007-08-14T11:19:58.332+08:00
BriteCheng/SHEEP
2007-08-17T15:43:51.71+08:00
jameszhou/ORYX
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSQLReportingServices.aspx#UsefulFooter
291
Reporting Services – Report language should follow user's language setting
0
0
0
\<Language\>=User!Language\</Language\>
0
*.rdl
true
0
false
13
3859
2007-08-13T18:18:08.766+08:00
BriteCheng/SHEEP
2007-08-13T18:18:35.915+08:00
BriteCheng/SHEEP
http://www.ssw.com.au/ssw/standards/rules/rulestobettersqlreportingservices.aspx#LanguageSetting
302
TEXT - Don't use "Retry", use "Try Again"
0
0
0
(?sixm:
\bretry\b
)
0
*.ascx;*.asp;*.aspx;*.master;*.htm;*.html;*.cs;*.vb;*.xml;*.config;*.txt
false
0
Don't use "Retry", use "Try Again"
false
10
683
2008-08-11T10:41:45.795+08:00
BillChen/WOLF
2008-08-11T11:45:35.023+08:00
BillChen/WOLF
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterTechnicalDocumentation.aspx#TryAgain
263
TEXT - Common spelling mistake
0
0
0
(?six-mn:
\b(?:thankyou|recieve|paremeter|definate|seperate)\b
)
0
*.ascx;*.asp;*.aspx;*.master;*.htm;*.html;*.cs;*.vb;*.xml;*.config;*.txt
false
0
thankyou -> thank you
recieve -> receive
paremeter -> parameter
definate -> definite
seperate -> separate
false
70
961
2006-05-31T13:32:41.875+08:00
RyanTee
2007-01-29T10:49:11.64+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
301
TEXT - Don't use "Task bar", use "Taskbar"
0
0
0
(?sixm:
\btask\sbar\b
)
0
*.ascx;*.asp;*.aspx;*.master;*.htm;*.html;*.cs;*.vb;*.xml;*.config;*.txt
false
0
Don't use "Task Bar", use "Taskbar"
false
10
672
2008-08-11T10:30:47.29+08:00
BillChen/WOLF
2008-08-11T10:40:26.397+08:00
BillChen/WOLF
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterTechnicalDocumentation.aspx#TaskBar
284
TEXT - Don't use "click on", use "click"
0
0
0
(?sixm:
\bclick\son\b
)
0
*.ascx;*.asp;*.aspx;*.master;*.htm;*.html;*.cs;*.vb;*.xml;*.config;*.txt
false
0
do not use 'click on' but use 'click'
false
13
176459
2007-08-08T15:48:40.647+08:00
BriteCheng/SHEEP
2007-08-08T15:50:01.329+08:00
BriteCheng/SHEEP
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterTechnicalDocumentation.aspx#FewWords
285
TEXT - Don't use "should" use "will"
0
0
0
(?sixm:
\bshould\b
)
0
*.ascx;*.asp;*.aspx;*.master;*.htm;*.html;*.cs;*.vb;*.xml;*.config;*.txt
false
0
do not use 'should' but use 'will'
false
14
733
2007-08-08T15:50:14.921+08:00
BriteCheng/SHEEP
2007-08-08T15:58:15.247+08:00
BriteCheng/SHEEP
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterTechnicalDocumentation.aspx#WillNotShould
220
TEXT - Don't use 'set up' or 'set-up' (Tip: Use an alternative verb - e.g 'configure')
0
0
0
(?sixm:
\bset\sup\b|\bset-up\b
)
0
*.ascx;*.asp;*.aspx;*.htm;*.html;*.cs;*.vb
false
0
Often when writing technical documents, you will instruct the reader to "set up" his PC or run a "setup" file. Remember that "set up" is a verb, and "setup" is a noun.
Correct use of "setup": Verify that your network setup is correct before attempting to connect to the Internet.
Correct use of "set up": Click Go to set up your database
To avoid confusion we suggest replacing "set up" the verb with an alternative, e.g. "configure".
false
67
14037
2005-08-16T15:26:25.753+08:00
GaryLam/HAMSTER
2005-12-21T22:49:06.781+08:00
RyanTee
http://www.ssw.com.au/SSW/Standards/Rules/RulesToBetterTechnicalDocumentation.aspx#Setup
255
TEXT - E-mail is not Email
0
0
0
(?ix:
e-mail
)
0
*.ascx;*.asp;*.aspx;*.master;*.htm;*.html;*.cs;*.vb;*.xml;*.config;*.txt
false
0
Yes Microsoft Word spell checker is wrong.
Good - "email"
Bad - "e-mail"
I do prefer to see e-mail as email as the hyphen is really an extra thing that serves no purpose anymore.
What if you wanted to say "Re-email this report please"... surely you would not say "Re-e-email this report"... sounds like you have a stutter.
false
122
784
2006-02-07T13:03:04.171+08:00
RyanTee/PITBULL
2006-08-15T11:22:12.671+08:00
RyanTee
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterTechnicalDocumentation.aspx#Email
262
TEXT - Internet is always capitalized
0
0
0
(?-i:\binternet\b)
0
*.ascx;*.asp;*.aspx;*.master;*.htm;*.html;*.cs;*.vb;*.xml;*.config;*.txt
false
0
Bad: internet
Good: Internet
false
(Empty)
70
916
2006-05-31T12:20:09.859+08:00
RyanTee
2006-08-15T11:22:07.031+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
26
TEXT - No carriage returns without line feed (Tip: Make sure the text file is in Window style not Unix)
0
0
0
\r(?!\n)
0
*.ascx;*.asp;*.aspx;*.cs;*.htm;*.html;*.txt;*.vb
false
0
false
0
112
772
2002-12-18T11:56:10+08:00
HIPPO
2003-06-18T11:04:25.086+08:00
SHARK
http://www.ssw.com.au/ssw/CodeAuditor/
72
TEXT - Non ASCII characters must not exist (Tip: Clean up all non ASCII charaters)
0
0
0
(?ix:
# Match all non ASCII characters..
[^\x00-\x7F]
)
0
*.ascx;*.asp;*.aspx;*.cs;*.htm;*.html;*.txt;*.vb
false
0
To use certain non ASCII characters or symbols in web, please use the numerical or alternate literal strings.
Eg:
© = ©
® = ®
™ = ™
false
29
790
2003-09-20T15:06:43.994+08:00
johnliu/KOALA
2005-12-21T22:48:12.203+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
179
TEXT - Use American Standard English (Tip: Fix in file)
0
0
0
(?six-mn:
Analyse|Analysing|Authorise|Authorisation|
Customise|
Dialogue|
Initialise|Initialising|
Organise|Organisation|Organising|
Recognise|Recognising|
Specialising|
Utilise|Utilising
)
0
*.ascx;*.asp;*.aspx;*.master;*.htm;*.html;*.cs;*.vb;*.xml;*.config;*.txt
false
0
We use American standards instead of Australian standards.
Analyse -> Analyze
Analysing -> Analyzing
Authorise -> Authorize
Authorisation -> Authorization
Customise -> Customize
Dialogue -> Dialog
Initialise -> Initialize
Initialising -> Initializing
Organise -> Organize
Organisation -> Organization
Organising -> Organizing
Recognise -> Recognize
Recognising -> Recognizing
Specialising -> Specializing
Utilise -> Utilize
Utilising -> Utilizing
false
122
1576
2005-04-11T17:00:54.692+08:00
GaryLam/HAMSTER
2006-08-15T11:19:55.187+08:00
RyanTee
http://www.ssw.com.au/ssw/CodeAuditor/
276
VB.NET Code - Constants should not be in uppercase
2
1
0
(?-i:Const\s+[A-Z]+[^a-z])
0
*.vb
false
0
false
0
0
2006-12-14T13:41:21.294+08:00
ericphan/ORCA
2006-12-14T16:12:15.952+08:00
ericphan/ORCA
287
WEB - Don't use '
0
0
0
&a(spo|pos);
0
*.ascx;*.asp;*.aspx;*.htm;*.html
false
0
"'" is not a valid HTML entity, it is a standard entity in XML and thus in XHTML. browers which does not support XHTML will have problem to display it correctly.
true
'
13709
11462688
2007-08-09T10:30:09.209+08:00
BriteCheng/SHEEP
2007-08-09T18:14:49.512+08:00
BriteCheng/SHEEP
http://www.ssw.com.au/ssw/standards/rules/RulesToBetterWebsitesLayout.aspx
286
WEB - Every page should have breadcrumb
0
0
0
\<asp\:SiteMapPath\s
0
*.aspx;
true
0
Breadcrumb should be on every page.
false
2597
31700
2007-08-08T19:19:09.133+08:00
BriteCheng/SHEEP
2007-08-14T15:57:33.916+08:00
BriteCheng/SHEEP
http://www.ssw.com.au/SSW/standards/rules/RulesToBetterwebsiteslayout.aspx#Breadcrumb
283
WEB - Use the correct symbols when documenting instructions
0
0
0
\s(->)\s
0
*.ascx;*.asp;*.aspx;*.htm;*.html
false
0
list the items in the order the user selects them
true
209
4575391
2007-08-07T14:01:50.304+08:00
BriteCheng/SHEEP
2007-08-08T17:30:02.344+08:00
BriteCheng/SHEEP
http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterTechnicalDocumentation.aspx#Instructions
-5
Maximum errors reached
-1
-1
-1
0
false
0
false
0
0
0
2006-07-12T11:24:50+08:00
ML
2006-07-12T11:24:50+08:00
ML
http://www.ssw.com.au/ssw/CodeAuditor/
-4
SKIP FILE
-1
-1
-1
0
false
0
false
0
0
0
2002-12-11T00:00:00+08:00
KOALA
2002-12-11T00:00:00+08:00
KOALA
http://www.ssw.com.au/ssw/CodeAuditor/
-3
ACCESS ERROR
-1
-1
-1
0
false
0
false
0
0
0
2002-12-11T00:00:00+08:00
KOALA
2002-12-11T00:00:00+08:00
KOALA
http://www.ssw.com.au/ssw/CodeAuditor/
-2
FILE ERROR
-1
-1
-1
0
false
0
false
0
0
0
2002-12-11T00:00:00+08:00
KOALA
2002-12-11T00:00:00+08:00
KOALA
http://www.ssw.com.au/ssw/CodeAuditor/
-1
HTTP ERROR
-1
-1
-1
0
false
0
false
0
0
0
2002-12-04T00:00:00+08:00
KOALA
2002-12-04T00:00:00+08:00
KOALA
http://www.ssw.com.au/ssw/CodeAuditor/
0
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/BaseForm.cs
268
false
This form should have its own icon.
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
2
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/BaseForm.Designer.cs
38, 46, 49, 57, 58, 59
289
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
3
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/BaseForm.Designer.cs
299
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
5
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/MainForm.cs
21, 27, 27, 28, 29, 30, 31, 48
289
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
6
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/MainForm.cs
48
273
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
7
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/MainForm.cs
27, 29
284
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
8
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/MainForm.Designer.cs
43, 46, 51, 54, 61, 64, 73, 77, 88, 95, 98, 103, 106, 111, 114, 130, 132
289
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
9
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/MainForm.Designer.cs
54
108
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
10
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/MainForm.Designer.cs
299
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
12
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/NorthwindWindowsCS2008.sln
271
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
13
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Program.cs
14
170
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
14
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Program.cs
26
289
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
15
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Program.cs
13
269
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
16
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.cs
80
190
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
17
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.cs
43
157
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
18
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.cs
16
170
false
2009-01-22T17:15:40.335+08:00
MAVERICK
2009-01-22T17:15:40.335+08:00
MAVERICK
19
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.cs
16, 32, 39, 46, 48, 59, 72, 82
289
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
20
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.cs
80
135
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
21
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.cs
46
117
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
22
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.cs
72
146
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
23
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.Designer.cs
47, 48, 55, 60, 63, 70, 73, 82, 91, 94, 100, 103, 109, 112, 117, 126, 134, 141, 144, 151, 154, 162, 165, 183, 187, 190
289
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
24
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.Designer.cs
63
122
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
25
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.Designer.cs
61
264
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
26
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.Designer.cs
184
112
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
27
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.Designer.cs
183
114
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
28
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.Designer.cs
299
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
29
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/SampleForm.Designer.cs
170
104
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
31
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Properties/AssemblyInfo.cs
8, 9, 10, 11, 12, 13, 14, 15, 23, 35
289
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
32
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Properties/AssemblyInfo.cs
35
221
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
33
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Properties/AssemblyInfo.cs
13
72
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
34
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Properties/Resources.Designer.cs
22, 22, 31, 31, 42, 65
289
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
35
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Properties/Resources.Designer.cs
299
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
36
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Properties/Settings.Designer.cs
16, 16
289
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
37
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Properties/Settings.Designer.cs
299
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
38
0
0
file:///C:/Program Files (x86)/SSW Code Auditor/Samples/NorthwindWindowsCS2008/Resources/ctlHeaderBar.HeaderPicture.png
45
false
2009-01-22T17:15:40.336+08:00
MAVERICK
2009-01-22T17:15:40.336+08:00
MAVERICK
0
NorthwindWindowsCS
0
C:\Program Files (x86)\SSW Code Auditor\Samples\NorthwindWindowsCS2008
true
0
78
0
true
1
86
0
true
2
190
0
true
3
157
0
true
4
53
0
true
5
74
0
true
6
169
0
true
7
161
0
true
8
101
0
true
9
123
0
true
10
202
0
true
11
138
0
true
12
170
0
true
13
183
0
true
14
166
0
true
15
195
0
true
16
192
0
true
17
140
0
true
18
289
0
true
19
221
0
true
20
275
0
true
21
296
0
true
22
303
0
true
23
269
0
true
24
260
0
true
25
273
0
true
26
281
0
true
27
135
0
true
28
145
0
true
29
146
0
true
30
117
0
true
31
162
0
true
32
178
0
true
33
277
0
true
34
163
0
true
35
271
0
true
36
105
0
true
37
108
0
true
38
106
0
true
39
122
0
true
40
61
0
true
41
232
0
true
42
171
0
true
43
297
0
true
44
120
0
true
45
264
0
true
46
121
0
true
47
259
0
true
48
231
0
true
49
103
0
true
50
112
0
true
51
130
0
true
52
114
0
true
53
142
0
true
54
118
0
true
55
254
0
true
56
299
0
true
57
93
0
true
58
268
0
true
59
104
0
true
60
288
0
true
61
5
0
true
62
156
0
true
63
49
0
true
64
155
0
true
65
45
0
true
66
22
0
true
67
293
0
true
68
291
0
true
69
302
0
true
70
263
0
true
71
301
0
true
72
284
0
true
73
285
0
true
74
220
0
true
75
255
0
true
76
262
0
true
77
26
0
true
78
72
0
true
79
179
0
true
80
276
0
true
81
287
0
true
82
286
0
true
83
283
0
true
8
86
WebService - Reference.cs
\\Web\sReferences\\[^\\]*\\Reference\.cs$
1
true
2006-07-28T15:16:35.343+08:00
RyanTee
2006-07-28T15:16:35.343+08:00
RyanTee