Skip to content

Commit 252b756

Browse files
authored
Merge pull request #472 from felicity-semmle/csharp/SD-2778-qhelp-update
C#: Minor updates for consistency (SD-2778)
2 parents 4b5f24d + fc6e9be commit 252b756

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

csharp/ql/src/Bad Practices/Naming Conventions/ControlNamePrefixes.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This makes the controls easier to find in Intellisense and also makes the purpos
88

99
</overview>
1010
<recommendation>
11-
<p>Give controls an appropriate prefix to indicate their type (e.g. txt for text boxes or rad for
11+
<p>Give controls an appropriate prefix to indicate their type (for example, <code>txt</code> for text boxes or <code>rad</code> for
1212
radio buttons).</p>
1313

1414
</recommendation>

csharp/ql/src/Bad Practices/Naming Conventions/ControlNamePrefixes.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @name ASP.NET control name prefixes
3-
* @description This query checks that certain prefixes are used for naming fields for
4-
* ASP.NET Web / HTML controls.
3+
* @description Including standard prefixes in the field names of
4+
* ASP.NET Web / HTML controls makes code easier to understand.
55
* @kind problem
66
* @problem.severity recommendation
77
* @precision medium

csharp/ql/src/Bad Practices/Naming Conventions/DefaultControlNames.qhelp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6-
<p>This rule identifies Windows form controls that have a default name such as <code>textBox1</code>
7-
.</p>
6+
<p>This query identifies Windows form controls that have a default name such as <code>textBox1</code>
7+
. Replacing the default names with names that describe their purpose makes it much easier for other
8+
developers to understand your code.</p>
89

910
</overview>
1011
<recommendation>
11-
<p>Give controls meaningful names that relate to their purpose.</p>
12+
<p>Give controls meaningful names that indicate their purpose.</p>
1213
</recommendation>
1314
</qhelp>

csharp/ql/src/Bad Practices/Naming Conventions/DefaultControlNames.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* @name Windows controls with generated names
3-
* @description Finds fields, corresponding to windows-forms controls, with generated names (such as "label1" or "PictureBox4").
3+
* @description Replacing the generated names in windows forms with meaningful names
4+
makes it easier for other developers to understand the code.
45
* @kind problem
56
* @problem.severity recommendation
67
* @precision medium

csharp/ql/src/Bad Practices/Naming Conventions/VariableNameTooShort.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6-
<p>Source code with lots of short variable names is likely to be hard to read.</p>
6+
<p>Source code with lots of short variable names is likely to be difficult to read.</p>
77

88
</overview>
99
<recommendation>

csharp/ql/src/Bad Practices/Naming Conventions/VariableNameTooShort.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Variable name is too short
3-
* @description Variables should have meaningful names so that code is comprehensible. This query finds variable names that are too short.
3+
* @description Using meaningful names for variables makes code easier to understand.
44
* @kind problem
55
* @problem.severity recommendation
66
* @precision low

0 commit comments

Comments
 (0)