Skip to content

Commit 7fb74c2

Browse files
author
Prabha Kylasamiyer Sundara Rajan
committed
Updated based on peer review feedback
Signed-off-by: Prabha Kylasamiyer Sundara Rajan <pkylasam@pkylasam-thinkpadp16vgen1.bengluru.csb>
1 parent f5469cf commit 7fb74c2

File tree

4 files changed

+58
-60
lines changed

4 files changed

+58
-60
lines changed

docs/topics/rules-development/create-csharp-custom-rule.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ You can use the following custom rule to check if {ProductShortName} triggers an
1313

1414
.Prerequisites
1515

16-
* You installed `ilspycmd` and `paket` dependencies
17-
* You installed `dotnet tools` and exported the `dotnet tools` path by using the `export PATH="$PATH:<path/to/.dotnet/tools"` command
16+
* You installed the `ilspycmd` and `paket` dependencies.
17+
* You installed the `dotnet tools` and exported the `dotnet tools` path by using the `export PATH="$PATH:<path/to/.dotnet/tools"` command.
1818
1919
.Procedure
2020
. Create a `csharp-rule.yaml` file in your `Home` directory.
@@ -57,7 +57,7 @@ You can use the following custom rule to check if {ProductShortName} triggers an
5757

5858
. Open a C# project that has the `WebMatrix.WebData.WebSecurity` class.
5959

60-
. Run the following command in the {ProductShortName} CLI:
60+
. Run an analysis with the following command in the {ProductShortName} CLI:
6161
+
6262

6363
[source, terminal]
@@ -68,7 +68,7 @@ $ ./mta-cli analyze -i _path_to_nerd-dinner_ -o _path_to_report_ --overwrite --r
6868
6969
[NOTE]
7070
====
71-
Add the `--overwrite` option if you want to use the same directory for the report when you run subsequent tests. {ProductShortName} overwrites the current report with the result of the latest analysis that you run.
71+
Add the `--overwrite` option if you want to use the same directory for the report when you run subsequent tests. {ProductShortName} overwrites the current report with the result of the latest analysis that you ran.
7272
====
7373

7474
. Open the static report at _path_to_report_ in your browser.

docs/topics/rules-development/yaml-dotnet-provider.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ when:
2424
----
2525
where:
2626

27-
`pattern` :: A regular expression pattern to match the needed reference. For example, `System.Web.Http.ApiController.*`
28-
`location` :: Specifies the location in the source code to search the pattern. For example, `CLASS`.
29-
27+
* `pattern` :: A regular expression pattern to match the needed reference. For example, `System.Web.Http.ApiController.*`
28+
* `location` :: Specifies the location in the source code to search the pattern. For example, `CLASS`.
29+
+
3030
NOTE: You can also specify `location` as `METHOD`, `FIELD`, or `ALL`. When the `location` is `ALL`, the `C#` provider runs a search query for namespaces, structure types, and interfaces.

docs/topics/rules-development/yaml-provider-conditions.adoc

Lines changed: 50 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -464,59 +464,57 @@ when:
464464

465465
|location
466466
|Yes
467-
a|Specify one of the following for which {ProductShortName} runs a search query.
468-
469-
* Type reference including classes, interfaces and structure types (struct)
470-
471-
For example,
472-
[subs="+quotes"]
473-
----
474-
when:
475-
csharp.referenced:
476-
location: CLASS
477-
pattern: System.Web.Http.ApiController.*
478-
----
479-
For example,
480-
[subs="+quotes"]
481-
----
482-
when:
483-
csharp.referenced:
484-
location: ALL
485-
pattern: "System.Console.Print*"
486-
----
487-
488-
* Method calls and definitions
467+
a|Specify one of the following for which {ProductShortName} runs a search query:
468+
469+
* Type reference including classes, interfaces and structure types (struct). For example:
470+
+
471+
472+
[subs="+quotes"]
473+
----
474+
when:
475+
csharp.referenced:
476+
location: CLASS
477+
pattern: System.Web.Http.ApiController.*
478+
----
479+
For example,
480+
481+
[subs="+quotes"]
482+
----
483+
when:
484+
csharp.referenced:
485+
location: ALL
486+
pattern: "System.Console.Print*"
487+
----
488+
489+
* Method calls and definitions. For example:
490+
491+
[subs="+quotes"]
492+
----
493+
when:
494+
csharp.referenced:
495+
location: METHOD
496+
pattern: "*.AppDomain.Unload"
497+
----
498+
499+
* Field usages and declaration. For example:
500+
501+
[subs="+quotes"]
502+
----
503+
when:
504+
csharp.referenced:
505+
location: FIELD
506+
pattern: "DotNetOpenAuth.AspNet.AuthenticationResult.Provider"
507+
----
508+
509+
* Namespace imports and usages. For example:
489510

490-
For example,
491-
[subs="+quotes"]
492-
----
493-
when:
494-
csharp.referenced:
495-
location: METHOD
496-
pattern: "*.AppDomain.Unload"
497-
----
498-
499-
* Field usages and declaration
500-
501-
For example,
502-
[subs="+quotes"]
503-
----
504-
when:
505-
csharp.referenced:
506-
location: FIELD
507-
pattern: "DotNetOpenAuth.AspNet.AuthenticationResult.Provider"
508-
----
509-
510-
* Namespace imports and usages
511-
512-
For example,
513-
[subs="+quotes"]
514-
----
515-
when:
516-
csharp.referenced:
517-
location: ALL
518-
pattern: "System.Windows.Forms"
519-
----
511+
[subs="+quotes"]
512+
----
513+
when:
514+
csharp.referenced:
515+
location: ALL
516+
pattern: "System.Windows.Forms"
517+
----
520518

521519
* `ALL` - You can also specify `ALL` as `location` to run a search query on any location in the code, including namespaces, structure types, and interfaces.
522520
|===

docs/topics/vscode/proc_vscode-analyzing-application.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ You can run a static code analysis of an application with or without enabling th
77

88
.Prerequisites
99

10-
* You opened a project in your VS Code workspace.
10+
* You opened a project in your Visual Studio Code workspace.
1111
* You installed the following for `.NET` or `C#` application analysis:
1212
.. The {ProductShortName} Core and `C#` extensions
1313
.. `dotnet tools` and added it to the `$PATH` environment variable

0 commit comments

Comments
 (0)