cezarypiatek / Csharpextensions
Licence: mit
A set of annotations and analyzers that add additional constraints to your codebase
Stars: ✭ 59
Labels
Projects that are alternatives of or similar to Csharpextensions
Codist
A visual studio extension which enhances syntax highlighting, quick info (tooltip), navigation bar, scrollbar, display quality and brings smart tool bar to code editor.
Stars: ✭ 134 (+127.12%)
Mutual labels: roslyn
Sonar Dotnet
Code analyzer for C# and VB.NET projects https://redirect.sonarsource.com/plugins/vbnet.html
Stars: ✭ 466 (+689.83%)
Mutual labels: roslyn
Mappinggenerator
🔄 "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
Stars: ✭ 831 (+1308.47%)
Mutual labels: roslyn
CsharpMacros
A simple template base system of macros for C# that can be executed in design time
Stars: ✭ 47 (-20.34%)
Mutual labels: roslyn
Awesome Roslyn
Curated list of awesome Roslyn books, tutorials, open-source projects, analyzers, code fixes, refactorings, and source generators
Stars: ✭ 395 (+569.49%)
Mutual labels: roslyn
Uno
Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
Stars: ✭ 6,029 (+10118.64%)
Mutual labels: roslyn
ThunderboltIoc
One of the very first IoC frameworks for .Net that has no reflection. An IoC that casts its services before thunder casts its bolts.
Stars: ✭ 40 (-32.2%)
Mutual labels: roslyn
Microsoft.codeanalysis.activepatterns
F# Active pattern library for Roslyn Compiler Platform (C#, VB)
Stars: ✭ 27 (-54.24%)
Mutual labels: roslyn
Codeconverter
Convert code from C# to VB.NET and vice versa using Roslyn
Stars: ✭ 432 (+632.2%)
Mutual labels: roslyn
Natasha
基于 Roslyn 的 C# 动态程序集构建库,该库允许开发者在运行时使用 C# 代码构建域 / 程序集 / 类 / 结构体 / 枚举 / 接口 / 方法等,使得程序在运行的时候可以增加新的模块及功能。Natasha 集成了域管理/插件管理,可以实现域隔离,域卸载,热拔插等功能。 该库遵循完整的编译流程,提供完整的错误提示, 可自动添加引用,完善的数据结构构建模板让开发者只专注于程序集脚本的编写,兼容 stanadard2.0 / netcoreapp3.0+, 跨平台,统一、简便的链式 API。 且我们会尽快修复您的问题及回复您的 issue.
Stars: ✭ 705 (+1094.92%)
Mutual labels: roslyn
Buildalyzer
A utility to perform design-time builds of .NET projects without having to think too hard about it.
Stars: ✭ 354 (+500%)
Mutual labels: roslyn
Security Code Scan
Vulnerability Patterns Detector for C# and VB.NET
Stars: ✭ 550 (+832.2%)
Mutual labels: roslyn
Ref12
Sends F12 in Visual Studio to the new .Net Reference Source Browser
Stars: ✭ 76 (+28.81%)
Mutual labels: roslyn
Polygen
PolyGen is a code generator that produces database schema, ORM layer, REST API and a (coming soon — stay tuned!) single-page web UI for your business model.
Stars: ✭ 19 (-67.8%)
Mutual labels: roslyn
replay-csharp
An editable C# REPL (Read Eval Print Loop) powered by Roslyn and .NET Core
Stars: ✭ 69 (+16.95%)
Mutual labels: roslyn
Roslynclrheapallocationanalyzer
Roslyn based C# heap allocation diagnostic analyzer that can detect explicit and many implicit allocations like boxing, display classes a.k.a closures, implicit delegate creations, etc.
Stars: ✭ 492 (+733.9%)
Mutual labels: roslyn
Omnisharp Roslyn
OmniSharp server (HTTP, STDIO) based on Roslyn workspaces
Stars: ✭ 1,062 (+1700%)
Mutual labels: roslyn
Rosetta
Toolset for migrating your codebase from C# to TypeScript
Stars: ✭ 23 (-61.02%)
Mutual labels: roslyn
CSharpExtensions
Nuget packge: https://www.nuget.org/packages/SmartAnalyzers.CSharpExtensions.Annotations/
Articles that explain implemented concepts:
- Immutable types in C# with Roslyn
- Improving non-nullable reference types handling
- Twin types - properties synchronization without inheritance
- Pure functions and unused return values
Analyzers
Rule | Description | Related attributes | Documentation |
---|---|---|---|
CSE001 | Required properties initialization | [InitRequired] |
link |
CSE002 | InitOnly member modification |
[InitOnly] , [InitOnlyOptional]
|
link |
CSE003 | Type should have the same fields as twin type | [TwinType] |
link |
CSE004 | Member with InitOnlyOptional requires default value | [InitOnlyOptional] |
|
CSE005 | Return value unused | link | |
CSE006 | Expression too complex |
Configuration
Add CSharpExtensions.json
file with custom configuration:
{
"CSE005": {
"IgnoredReturnTypes": [
"Microsoft.Extensions.DependencyInjection.IServiceCollection",
"Microsoft.Extensions.Configuration.IConfigurationBuilder",
"Microsoft.Extensions.Logging.ILoggingBuilder"
]
}
}
Include config file as AdditionalFile
in csproj
:
<ItemGroup>
<AdditionalFiles Include="CSharpExtensions.json" />
</ItemGroup>
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].