Skip to main content
Version: Next

Analyzer rules

RuleCategoryDefault severityAvailabilityDescription
MP0001UsageErrorPublic analyzer packageAccesses a module result without declaring the dependency.
MP0002UsageErrorPublic analyzer packageUses IEnumerable as a module result instead of a concrete collection.
MP0003UsageErrorPublic analyzer packageInjects a logger into a module constructor instead of using the module context.
MP0004UsageErrorPublic analyzer packageWrites directly to System.Console instead of using pipeline logging.
MP0005UsageErrorPublic analyzer packageCreates a circular dependency between modules.
MP0006UsageErrorPublic analyzer packageImplements ExecuteAsync without the async modifier.
MP0007UsageErrorPublic analyzer packageAwaits the current module instance.
MP0008DesignWarningPublic analyzer packageDeclares mutable instance state that can leak between module executions.
MP0009UsageErrorPublic analyzer packageReferences a dependency type that does not implement IModule.
MP0010UsageErrorPublic analyzer packageDeclares a module dependency on itself.
MP0011UsageWarningRepository development onlyRequires generated CLI option properties to be virtual.
MP0012UsageWarningRepository development onlyRequires generated CLI command methods to be virtual.
MP0013UsageWarningPublic analyzer packageModule is not registered with the pipeline.
MP0014UsageWarningPublic analyzer packageAsync void method in a module.
MP0015UsageWarningPublic analyzer packageBlocking call in ExecuteAsync.
MP0016UsageWarningPublic analyzer packageExecuteAsync cancellation token is not flowed.
MP0017UsageWarningPublic analyzer packageThread.Sleep in ExecuteAsync.
MP0018UsageWarningPublic analyzer packageModule class is not public.
MP0019UsageWarningPublic analyzer packageDuplicate DependsOn declaration.
MPCLI001UsageErrorPublic analyzer packageCliFlag property must be bool? or int?
MPCLI002UsageErrorPublic analyzer packageValue-less bool? CliOption should use CliFlag.
MPCLI003UsageErrorPublic analyzer packageMultiple CLI attributes applied to one property.
MPCLI004UsageErrorPublic analyzer packageDuplicate CLI switch in an options hierarchy.
MPCLI006UsageErrorPublic analyzer packageCLI attributes used outside CommandLineToolOptions.