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

Function parse_no_matching_file

src/phpcs.rs:622–651  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

620
621 #[test]
622 fn parse_no_matching_file() {
623 let json = r#"{
624 "totals": {"errors": 1, "warnings": 0, "fixable": 0},
625 "files": {
626 "/project/src/Bar.php": {
627 "errors": 1,
628 "warnings": 0,
629 "messages": [
630 {
631 "message": "Error in Bar.",
632 "source": "Generic.Sniff.Name",
633 "severity": 5,
634 "fixable": false,
635 "type": "ERROR",
636 "line": 1,
637 "column": 1
638 }
639 ]
640 },
641 "/project/src/Baz.php": {
642 "errors": 0,
643 "warnings": 0,
644 "messages": []
645 }
646 }
647 }"#;
648 let path = Path::new("/project/src/Foo.php");
649 let diags = parse_phpcs_json(json, path).unwrap();
650 assert!(diags.is_empty());
651 }
652
653 #[test]
654 fn parse_invalid_json() {

Callers

nothing calls this directly

Calls 2

parse_phpcs_jsonFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected