Skip to content

Commit

Permalink
Added roslyn rules for requests and responses #10
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Mar 20, 2024
1 parent eca83b1 commit 5b96dbe
Show file tree
Hide file tree
Showing 22 changed files with 3,891 additions and 3,064 deletions.
8 changes: 4 additions & 4 deletions src/BookingsDomain/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public static Created Create(Identifier id, Identifier organizationId)
public required DateTime OccurredUtc { get; set; }

Check warning on line 24 in src/BookingsDomain/Events.cs

View workflow job for this annotation

GitHub Actions / build

Property 'OccurredUtc' must return one of these primitive types: 'bool or string or ulong or int or long or double or decimal or System.DateTime or byte', or any Enum, or a List<T>/Dictionary<string, T> of one of those types
}

#pragma warning disable SAS063
#pragma warning disable SAASDDD043
public sealed class ReservationMade : IDomainEvent
#pragma warning restore SAS063
#pragma warning restore SAASDDD043
{
public static ReservationMade Create(Identifier id, Identifier organizationId, Identifier borrowerId,
DateTime start, DateTime end)
Expand Down Expand Up @@ -99,9 +99,9 @@ public static TripAdded Create(Identifier id, Identifier organizationId)
public required DateTime OccurredUtc { get; set; }
}

#pragma warning disable SAS063
#pragma warning disable SAASDDD043
public sealed class TripBegan : IDomainEvent
#pragma warning restore SAS063
#pragma warning restore SAASDDD043
{
public static TripBegan Create(Identifier id, Identifier organizationId, Identifier tripId,
DateTime beganAt, Location from)
Expand Down
4 changes: 4 additions & 0 deletions src/SaaStack.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,10 @@ public void When$condition$_Then$outcome$()
<s:Boolean x:Key="/Default/UserDictionary/Words/=putpatch/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=readmodel/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=redrive/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SAASAPP/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SAASDDD/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SAASDOC/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SAASWEB/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=secondjoiningtestentities/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=stringified/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Syntaxes/@EntryIndexedValue">True</s:Boolean>
Expand Down
8 changes: 5 additions & 3 deletions src/Tools.Analyzers.Common/AnalyzerConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ namespace Tools.Analyzers.Common;

public static class AnalyzerConstants
{
public const string ServiceOperationTypesNamespace = "Infrastructure.Web.Api.Operations.Shared";
public const string ResourceTypesNamespace = "Application.Resources.Shared";
public const string RequestTypeSuffix = "Request";
public const string ResponseTypeSuffix = "Response";
public static readonly string[] PlatformNamespaces =
{
#if TESTINGONLY
Expand All @@ -19,13 +23,11 @@ public static class AnalyzerConstants
"IntegrationTesting.WebApi.Common", "UnitTesting.Common"
};

public const string ResourceTypesNamespace = "Application.Resources.Shared";

public static class Categories
{
public const string Application = "SaaStackApplication";
public const string Ddd = "SaaStackDDD";
public const string Documentation = "SaaStackDocumentation";
public const string WebApi = "SaaStackWebApi";
public const string Application = "SaaStackApplication";
}
}
Loading

0 comments on commit 5b96dbe

Please sign in to comment.