
Instálelo a través de la línea de comando:
Install-Package SharpSourceo agregue una referencia usted mismo:
< ItemGroup >
< PackageReference Include = " SharpSource " Version = " 1.26.0 " PrivateAssets = " All " />
</ ItemGroup >Si desea instalarlo como una extensión, descárguelo desde el mercado.
Este repositorio alberga una colección de analizadores que tienen como objetivo hacer que algunas características de lenguaje y tipos de marco sean más fáciles de trabajar. Lo hace al resaltar cuándo podría estar usando algo incorrectamente de una manera que resulte en un rendimiento subóptimo, excepciones de tiempo de ejecución o un comportamiento general no deseado.
En otras palabras, este repositorio solo contiene analizadores para patrones que tienen un potencial concreto para convertirse en un boleto de defecto . No está destinado a ayudar con tareas generales de limpieza, como formatear su código o proporcionar ayudantes de productividad.
¿Interesado en contribuir? ¡Echa un vistazo a las pautas!
Las explicaciones detalladas de cada analizador se pueden encontrar en la documentación: https://github.com/vannevelj/sharpsource/tree/master/docs
| Código | Nombre |
|---|---|
| SS001 | Asyncmethodwithvoidreturntype |
| SS002 | DatetimeNow |
| SS003 | DivideIntegerByInteger |
| SS004 | ElementaryMethodSofTypeRincollectionNotOverridden |
| SS005 | Iguales y gotas |
| SS006 | Tirado |
| SS007 | FlagSenumValuueSarenotpowerSoftwo |
| SS008 | GethashcodereFerstomutableMember |
| SS009 | Bucle de bucle |
| SS010 | Newguid |
| SS011 | OnPropertyChangedWitHoutNameOfoperator |
| SS012 | Recursiveperateroverload |
| SS013 | RethrowException sin llave |
| SS014 | StringDotFormAtWithDiFferentMoUuntOfarGuments |
| SS015 | StringPlaceHolderSinWrongOrder |
| SS017 | Estructura sin m de methodsoverridden |
| SS018 | Switchdoesnothandleallenumoptions |
| SS019 | SwitchismissingDefaultLabel |
| SS020 | TestMethodwithoutPublicModifier |
| SS021 | TestMethodWitHoutTestatTribute |
| SS022 | Exceptionthrown desde el operador de la implícito |
| SS023 | ExceptionthrownFromPropertygetter |
| SS024 | ExceptionthrownFromstaticConstructor |
| SS025 | ExceptionthrownFinallyblock |
| SS026 | ExceptionthrownfromequalityOperator |
| SS027 | ExceptionthrownFromDispose |
| SS028 | ExceptionthrownFromfinalizer |
| SS029 | ExceptionthrownFromGetHASHCODE |
| SS030 | Exceptionthrownfromequals |
| SS032 | Threadsleepinasyncmethod |
| SS033 | AsyncoverloadSaveable |
| SS034 | Acceso a TaskResultwitHoUtait |
| SS035 | Synchronoustakwait |
| SS036 | Valores explícitos |
| SS037 | HttpClientInstantiated directamente |
| SS038 | HttpContextStoredInfield |
| SS039 | EnumwithoutDefaultValue |
| SS040 | No utilizado |
| SS041 | InnecesaryenumerableMaterialización |
| SS042 | Instancefieldwiththreadstatic |
| SS043 | Múltiples de párpamos |
| SS044 | AttributeMustSpecifyAttributeUsage |
| SS045 | Staticinitializeracsacesseforeinitialization |
| SS046 | Unboundedstackalloc |
| SS047 | Linqtraversalbeforefilter |
| SS048 | LockingOdiscouragedObject |
| SS049 | Comparación de comparación |
| SS050 | ParameterSignedInstructor |
| SS051 | LockingonMutableReference |
| SS052 | Threadstaticwithinitializer |
| SS053 | Sin sentido |
| SS054 | NewtonsoftMixedWithSystemTextjson |
| SS055 | MúltipleerByCalls |
| SS056 | Formreadsynchrony |
| SS057 | RecolectionManipulatedDuringTraversal |
| SS058 | StringconcatenatedInloop |
| SS059 | Desechado |
| SS060 | ConcurrentDictoryApmyCheck |
¿Es una regla particular no para su gusto? Hay muchas maneras de ajustar su gravedad e incluso deshabilitarlas por completo. Para obtener una descripción general de algunas de las opciones, consulte este documento.