Skip to content

Commit 7a95d4c

Browse files
display options control in table (#43946)
* display options control in table * Update docs/csharp/language-reference/compiler-options/errors-warnings.md
1 parent 5a23d0b commit 7a95d4c

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

docs/csharp/language-reference/compiler-options/errors-warnings.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,19 @@ helpviewer_keywords:
1616
---
1717
# C# Compiler Options to report errors and warnings
1818

19-
The following options control how the compiler reports errors and warnings. The new MSBuild syntax is shown in **Bold**. The older *csc.exe* syntax is shown in `code style`.
20-
21-
- **WarningLevel** / `-warn`: Set warning level.
22-
- **AnalysisLevel**: Set optional warning level.
23-
- **TreatWarningsAsErrors** / `-warnaserror`: Treat all warnings as errors
24-
- **WarningsAsErrors** / `-warnaserror`: Treat one or more warnings as errors
25-
- **WarningsNotAsErrors** / `-warnnotaserror`: Treat one or more warnings not as errors
26-
- **NoWarn** / `-nowarn`: Set a list of disabled warnings.
27-
- **CodeAnalysisRuleSet** / `-ruleset`: Specify a ruleset file that disables specific diagnostics.
28-
- **ErrorLog** / `-errorlog`: Specify a file to log all compiler and analyzer diagnostics.
29-
- **ReportAnalyzer** / `-reportanalyzer`: Report additional analyzer information, such as execution time.
19+
The following options control how the compiler reports errors and warnings.
20+
21+
| MSBuild syntax | _csc.exe_ syntax | Description |
22+
| ----------------------- | ----------------- | ------------------------------------------------------------------------------------------------- |
23+
| `WarningLevel` | `-warn` | Set warning level. [More info.](#warninglevel) |
24+
| `AnalysisLevel` | / | Set optional warning level. [More info.](#analysis-level) |
25+
| `TreatWarningsAsErrors` | `-warnaserror` | Treat all warnings as errors. [More info.](#treatwarningsaserrors) |
26+
| `WarningsAsErrors` | `-warnaserror` | Treat one or more warnings as errors. [More info.](#warningsaserrors-and-warningsnotaserrors) |
27+
| `WarningsNotAsErrors` | `-warnnotaserror` | Treat one or more warnings not as errors. [More info.](#warningsaserrors-and-warningsnotaserrors) |
28+
| `NoWarn` | `-nowarn` | Set a list of disabled warnings. [More info.](#nowarn) |
29+
| `CodeAnalysisRuleSet` | `-ruleset` | Specify a ruleset file that disables specific diagnostics. [More info.](#codeanalysisruleset) |
30+
| `ErrorLog` | `-errorlog` | Specify a file to log all compiler and analyzer diagnostics. [More info.](#errorlog) |
31+
| `ReportAnalyzer` | `-reportanalyzer` | Report additional analyzer information, such as execution time. [More info.](#reportanalyzer) |
3032

3133
> [!NOTE]
3234
> Refer to [Compiler options](index.md#how-to-set-options) for more information on configuring these options for your project.

0 commit comments

Comments
 (0)