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

Function parse_no_matching_file

src/mago.rs:851–885  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

849
850 #[test]
851 fn parse_no_matching_file() {
852 let content = "<?php\n";
853 let file_path = "/tmp/phpantom-mago-abc.php";
854
855 let json = r#"{
856 "issues": [
857 {
858 "level": "Error",
859 "code": "some-error",
860 "message": "Error in other file.",
861 "notes": [],
862 "help": "",
863 "annotations": [
864 {
865 "message": "here",
866 "kind": "Primary",
867 "span": {
868 "file_id": {
869 "name": "other.php",
870 "path": "/project/src/other.php",
871 "size": 100,
872 "file_type": "Host"
873 },
874 "start": { "offset": 0, "line": 0 },
875 "end": { "offset": 5, "line": 0 }
876 }
877 }
878 ]
879 }
880 ]
881 }"#;
882
883 let diags = parse_mago_json(json, content, file_path, "mago-lint").unwrap();
884 assert!(diags.is_empty());
885 }
886
887 // ── has_mago_config ─────────────────────────────────────────────
888

Callers

nothing calls this directly

Calls 2

parse_mago_jsonFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected