-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Use single
Diagnostic
class to represent all core diagnos…
…tics (#14875) The split class structure between `ErrorDiagnostic` & `Diagnostic` is something I've been meaning to remove since the very early days of Bicep. I've decided to do it now, because it'll simplify the refactor needed for #14842. The majority of the changes in this PR were made using refactoring tools, not manually. The main changes I made were: * Removed `ErrorDiagnostic`, `ErrorBuilderDelegate`, `FixableErrorDiagnostic` * Converted `diag is ErrorDiagnostic` type checks to use `diag.Level == DiagnosticLevel.Error` instead * Renamed `ResultWithDiagnostic` to `ResultWithDiagnosticBuilder` instead to more accurately represent its purpose * Created `ResultWithDiagnotic<T>`, and replaced usage of `Result<T, Diagnostic>` with it * Other changes were mostly downstream changes of the above ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/14875)
- Loading branch information
1 parent
a8a0294
commit e8ae96b
Showing
79 changed files
with
944 additions
and
746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 0 additions & 63 deletions
63
src/Bicep.Core.UnitTests/Assertions/ErrorBuilderAssertions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,5 @@ public Diagnostic( | |
public string Message { get; } | ||
|
||
public Uri? Uri { get; } | ||
|
||
} | ||
} |
Oops, something went wrong.