Closed kpau closed 4 years ago
There are still several errors coming from the code analyzer:
CA1026: Replase method 'UserInput.' with an overload that supplies all default arguments.
The rule applies only to public methods and Microsoft does not recommend to suppress this rule. The UserInput
class is used only in the ConsoleApp, so it should not be set as public
at first place. Set its Access Modifier to internal
. This should resolve the warnings.
Reference: Access Modifiers (C# Programming Guide)
CA1704: Correct the spelling of 'Todo'.
In our case this is intentionally misspelled. To resolve the warnings create CustomDictionary.xml
file and add "Todo" as a Recognied word. See How to Fix Violations for details.
CA2210: Assemblies should have valid strong names. This is advanced topic, but it is recommended for an assembly to be signed with a valid strong name. To resolve this just follow the instructions under How to Fix Violations > To sign your assembly with a strong name in Visual Studio (steps 1-7). Follow these instructions for both projects in the solution. The "Key file name" should be the name of the project: "TodoApp.ConsoleApp" and "TodoApp.Library".
Regarding the wiki page:
Comments on the code will be added in the Pull Request.
The wiki page and the code changes looks good 👍 There are some minor comments in the PR.
Enforce the use of best practices and code standards when developing the app. Read what is static code analysis. Add it to the project. Create a page in the Wiki which will include:
Run the analysis on the project and investigate the errors. Make a list of the types of the errors and post it in this issue as a comment. We will discuss which needs fixing and which can be ignored.
See Overview of code analysis for managed code in Visual Studio for more information.