forked from PLC-lang/rusty
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(diagnostics): refactor the diagnostics to be more consistant (PL…
…C-lang#1063) * feat(PLC-lang#826): refactor the diagnostics to be more consistant Diagnostics are now created using builder methods, and are no longer enums. A severity field now indicates the default severity of a diagnostic. This can be overridden in a diagnostian. This is yet to be implemented. We now use Anyhow to report some errors to simplify conversions between our Diagnostic type and some rust types. * feat: rework the errors and diagnostics Errors / Diagnostics are now of a single type and can be constructed using a builder pattern. The error codes are now a string value instead of an enum, each error can now have a description. At a later stage the descriptions would be accessible from the command line and the book, for now they do nothing. This now allows the option make erros configurable using the Diagnostician so that the user can ignore certain warnings or upgrade a warning to an error. With this commit all erros will now break compilation. This has not yet been tested with existing code but I assume in the current state we will have issues. We should test this with oscat and internal projects before commiting to decide if the severity we set as default is OK. * Convert pointer error to warning, fix a false positive * fix: array bounds are dint not int The location problems in the validation snap are still open. * Make sure snapshots are still valid The snapshots were re-applied after we switched them to buffered diagnostics. Some issues were fixed as a result
- Loading branch information
Showing
314 changed files
with
2,673 additions
and
2,513 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.