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

Function parse_top_level_errors

src/phpstan.rs:700–711  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

698
699 #[test]
700 fn parse_top_level_errors() {
701 let json = r#"{
702 "totals": {"errors": 1, "file_errors": 0},
703 "files": {},
704 "errors": ["PHPStan requires PHP >= 7.2.0, you have 7.1.0"]
705 }"#;
706 let path = Path::new("/project/src/Foo.php");
707 let diags = parse_phpstan_json(json, path).unwrap();
708 assert_eq!(diags.len(), 1);
709 assert_eq!(diags[0].range.start.line, 0);
710 assert!(diags[0].message.contains("PHP >= 7.2.0"));
711 }
712
713 #[test]
714 fn parse_message_with_tip() {

Callers

nothing calls this directly

Calls 2

parse_phpstan_jsonFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected