MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / parse_message_without_identifier

Function parse_message_without_identifier

src/phpstan.rs:743–767  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

741
742 #[test]
743 fn parse_message_without_identifier() {
744 let json = r#"{
745 "totals": {"errors": 0, "file_errors": 1},
746 "files": {
747 "/project/src/Foo.php": {
748 "errors": 1,
749 "messages": [
750 {
751 "message": "Some old-style error.",
752 "line": 1,
753 "ignorable": true
754 }
755 ]
756 }
757 },
758 "errors": []
759 }"#;
760 let path = Path::new("/project/src/Foo.php");
761 let diags = parse_phpstan_json(json, path).unwrap();
762 assert_eq!(diags.len(), 1);
763 assert_eq!(
764 diags[0].code,
765 Some(NumberOrString::String("phpstan".to_string()))
766 );
767 }
768
769 #[test]
770 fn parse_relative_path_match() {

Callers

nothing calls this directly

Calls 2

parse_phpstan_jsonFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected