-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Rules. Guidance and enforcement #10
Comments
commit 6c6fcd4 implemented the first few diagnostics commit 04eb2d5 added project templates, which enforce the project references for the second part. Not sure its worth implementing a Roslyn analyzer for a *.csproj file, since most developers don't spend much time inside them and may never see the diagnostics. However, the build warnings may direct them there. Can investigate |
Roslyn rules for Aggregates and value objects: Root Aggregates
Entities
Value Objects
|
Architecture Tests library NetArchTest, or ArchUnit LayersAPI
Applicaton
Domain
Vertical Slices
|
Last rule: (probably Roslyn) Foreach then load that type, and scan all entities and aggregates, and make sure they have entries in the |
CodeFixes:
|
These coding rules should be backed by Rosyln Analyzers and Code Fixes.
API Class
Location: any project with variable:
<HasApi>true</HasApi>
Definition: Any instance method of an API class (instance class derived from
IWebApiService
)Rules:
Task<T>
orT
, whereT
is eitherApiEmptyResult
orApiResult<TResource, TResponse>
orApiPostResult<TResource, TResponse>
.IWebRequest<TResponse>
, where TResponse is same type as in the return value. Second parameter can only be aCancellationToken
WebApiRouteAttribute
TRequest
API project file (csproj)
Location: any project with variable:
<HasApi>true</HasApi>
Definition: N/A
Rules:
SaaStack.Tools.Generators.WebApi
or a project reference toTools.Generators.WebApi.csproj
The text was updated successfully, but these errors were encountered: