{"id":13783759,"url":"https://github.com/Vannevelj/SharpSource","last_synced_at":"2025-05-11T19:31:31.900Z","repository":{"id":53877758,"uuid":"251067515","full_name":"Vannevelj/SharpSource","owner":"Vannevelj","description":"surfacing defects at compile time and preventing issues that would otherwise go unnoticed","archived":false,"fork":false,"pushed_at":"2024-09-15T21:53:23.000Z","size":897,"stargazers_count":29,"open_issues_count":33,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-01T17:11:38.592Z","etag":null,"topics":["analyzer","code-analysis","roslyn","roslyn-analyzer","roslyn-codefix","static-analysis","visual-studio-extension"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vannevelj.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-29T15:37:51.000Z","updated_at":"2024-09-15T21:48:30.000Z","dependencies_parsed_at":"2024-01-17T02:16:18.615Z","dependency_job_id":"9d59572d-a3bf-470c-9933-bcbe846b0b3b","html_url":"https://github.com/Vannevelj/SharpSource","commit_stats":{"total_commits":245,"total_committers":5,"mean_commits":49.0,"dds":0.3346938775510204,"last_synced_commit":"95078ff26a9bdbc4ee7ef35a1c7769e397dbb914"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vannevelj%2FSharpSource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vannevelj%2FSharpSource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vannevelj%2FSharpSource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vannevelj%2FSharpSource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vannevelj","download_url":"https://codeload.github.com/Vannevelj/SharpSource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225086538,"owners_count":17418744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analyzer","code-analysis","roslyn","roslyn-analyzer","roslyn-codefix","static-analysis","visual-studio-extension"],"created_at":"2024-08-03T19:00:30.227Z","updated_at":"2025-05-11T19:31:31.873Z","avatar_url":"https://github.com/Vannevelj.png","language":"C#","funding_links":[],"categories":["Popular Analyzers"],"sub_categories":["Analyzer collections"],"readme":"[![Nuget Downloads](https://img.shields.io/nuget/dt/SharpSource)](https://www.nuget.org/packages/SharpSource/) [![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/JeroenVannevel.sharpsource)](https://marketplace.visualstudio.com/items?itemName=JeroenVannevel.sharpsource)\n\n![Demonstration of an analyzer which removes unnecessary IEnumerable materializations](https://user-images.githubusercontent.com/2777107/190013653-edfcb61b-06a1-46d4-8b99-a71173beebb2.gif)\n\n## Quickstart\n\nInstall it through the command line:\n\n```powershell\nInstall-Package SharpSource\n```\n\nor add a reference yourself:\n\n```xml\n\u003cItemGroup\u003e\n    \u003cPackageReference Include=\"SharpSource\" Version=\"1.27.1\" PrivateAssets=\"All\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\nIf you would like to install it as an extension instead, download it [from the marketplace](https://marketplace.visualstudio.com/items?itemName=JeroenVannevel.sharpsource).\n\n---\n\nThis repo houses a collection of analyzers that aim to make some language features and framework types easier to work with. It does this by highlighting when you might be using something incorrectly in a way that would result in suboptimal performance, runtime exceptions or general unintended behaviour. \n\nIn other words, **this repo only contains analyzers for patterns that have a concrete potential to turn into a defect ticket**. It is not intended to help with general housekeeping tasks like formatting your code or providing productivity helpers. \n\nInterested in contributing? Take a look at [the guidelines](./CONTRIBUTING.md)!\n\n---\n\nDetailed explanations of each analyzer can be found in the documentation: https://github.com/Vannevelj/SharpSource/tree/master/docs\n \n\n| Code   | Name |\n|---|---|\n| SS001  | AsyncMethodWithVoidReturnType  |\n| SS002  | DateTimeNow  |\n| SS003  | DivideIntegerByInteger  |\n| SS004  | ElementaryMethodsOfTypeInCollectionNotOverridden | \n| SS005  | EqualsAndGetHashcodeNotImplementedTogether  | \n| SS006  | ThrowNull  |\n| SS007  | FlagsEnumValuesAreNotPowersOfTwo  | \n| SS008  | GetHashCodeRefersToMutableMember  | \n| SS009  | LoopedRandomInstantiation  | \n| SS010  | NewGuid  | \n| SS011  | OnPropertyChangedWithoutNameofOperator  | \n| SS012  | RecursiveOperatorOverload  | \n| SS013  | RethrowExceptionWithoutLosingStacktrace | \n| SS014  | StringDotFormatWithDifferentAmountOfArguments  | \n| SS015  | StringPlaceholdersInWrongOrder  | \n| SS017  | StructWithoutElementaryMethodsOverridden  | \n| SS018  | SwitchDoesNotHandleAllEnumOptions  |\n| SS019  | SwitchIsMissingDefaultLabel  |\n| SS020  | TestMethodWithoutPublicModifier  | \n| SS021  | TestMethodWithoutTestAttribute  | \n| SS022  | ExceptionThrownFromImplicitOperator  | \n| SS023  | ExceptionThrownFromPropertyGetter  |\n| SS024  | ExceptionThrownFromStaticConstructor  | \n| SS025  | ExceptionThrownFromFinallyBlock  | \n| SS026  | ExceptionThrownFromEqualityOperator  |\n| SS027  | ExceptionThrownFromDispose   | \n| SS028  | ExceptionThrownFromFinalizer  |\n| SS029  | ExceptionThrownFromGetHashCode |\n| SS030  | ExceptionThrownFromEquals  | \n| SS032  | ThreadSleepInAsyncMethod  | \n| SS033  | AsyncOverloadsAvailable  | \n| SS034  | AccessingTaskResultWithoutAwait  |\n| SS035  | SynchronousTaskWait  | \n| SS036  | ExplicitEnumValues  | \n| SS037  | HttpClientInstantiatedDirectly  | \n| SS038  | HttpContextStoredInField  | \n| SS039  | EnumWithoutDefaultValue  | \n| SS040  | UnusedResultOnImmutableObject  | \n| SS041  | UnnecessaryEnumerableMaterialization  | \n| SS042  | InstanceFieldWithThreadStatic  | \n| SS043  | MultipleFromBodyParameters  | \n| SS044  | AttributeMustSpecifyAttributeUsage  | \n| SS045  | StaticInitializerAccessedBeforeInitialization  | \n| SS046  | UnboundedStackalloc  | \n| SS047  | LinqTraversalBeforeFilter  | \n| SS048  | LockingOnDiscouragedObject  | \n| SS049  | ComparingStringsWithoutStringComparison  | \n| SS050  | ParameterAssignedInConstructor  | \n| SS051  | LockingOnMutableReference  | \n| SS052  | ThreadStaticWithInitializer |\n| SS053  | PointlessCollectionToString |\n| SS054  | NewtonsoftMixedWithSystemTextJson |\n| SS055  | MultipleOrderByCalls |\n| SS056  | FormReadSynchronously |\n| SS057  | CollectionManipulatedDuringTraversal |\n| SS058  | StringConcatenatedInLoop |\n| SS059  | DisposeAsyncDisposable |\n| SS060  | ConcurrentDictionaryEmptyCheck |\n\n## Configuration\nIs a particular rule not to your liking? There are many ways to adjust their severity and even disable them altogether. For an overview of some of the options, check out [this document](https://docs.microsoft.com/en-gb/dotnet/fundamentals/code-analysis/suppress-warnings).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVannevelj%2FSharpSource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVannevelj%2FSharpSource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVannevelj%2FSharpSource/lists"}