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

Function parse_relative_path_match

src/phpstan.rs:770–792  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

768
769 #[test]
770 fn parse_relative_path_match() {
771 let json = r#"{
772 "totals": {"errors": 0, "file_errors": 1},
773 "files": {
774 "/home/user/project/src/Foo.php": {
775 "errors": 1,
776 "messages": [
777 {
778 "message": "Error in Foo.",
779 "line": 3,
780 "ignorable": true,
781 "identifier": "phpstan"
782 }
783 ]
784 }
785 },
786 "errors": []
787 }"#;
788 // Use a relative path that should still match via suffix.
789 let path = Path::new("src/Foo.php");
790 let diags = parse_phpstan_json(json, path).unwrap();
791 assert_eq!(diags.len(), 1);
792 }
793
794 #[test]
795 fn parse_no_matching_file() {

Callers

nothing calls this directly

Calls 2

parse_phpstan_jsonFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected