diff --git a/Directory.Build.props b/Directory.Build.props index 415d7d1be1..709bdd8815 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - net8.0 + net9.0 true embedded $(MSBuildThisFileDirectory)artifacts diff --git a/benchmarks/Riok.Mapperly.Benchmarks/Riok.Mapperly.Benchmarks.csproj b/benchmarks/Riok.Mapperly.Benchmarks/Riok.Mapperly.Benchmarks.csproj index beb52efb02..aa057f29ae 100644 --- a/benchmarks/Riok.Mapperly.Benchmarks/Riok.Mapperly.Benchmarks.csproj +++ b/benchmarks/Riok.Mapperly.Benchmarks/Riok.Mapperly.Benchmarks.csproj @@ -18,7 +18,8 @@ runtime; build; native; contentfiles; analyzers - + + diff --git a/docs/docs/configuration/generated-source.mdx b/docs/docs/configuration/generated-source.mdx index 94f1f2772a..8cea90853a 100644 --- a/docs/docs/configuration/generated-source.mdx +++ b/docs/docs/configuration/generated-source.mdx @@ -35,7 +35,7 @@ dotnet build /p:EmitCompilerGeneratedFiles=true By default the files are written to `{BaseIntermediateOutpath}/generated/{Assembly}/Riok.Mapperly/{GeneratedFile}`. -With `BaseIntermediateOutpath` for example being `obj/Debug/net8.0`. +With `BaseIntermediateOutpath` for example being `obj/Debug/net9.0`. By convention, generated C# source code files will have the file extension `.g.cs`. The output path can be customized via the `CompilerGeneratedFilesOutputPath` property. diff --git a/docs/package-lock.json b/docs/package-lock.json index b5fdd4f4d0..90e2ab6957 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -8,9 +8,9 @@ "name": "docs", "version": "0.0.0", "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/plugin-ideal-image": "3.6.0", - "@docusaurus/preset-classic": "3.6.0", + "@docusaurus/core": "3.6.1", + "@docusaurus/plugin-ideal-image": "3.6.1", + "@docusaurus/preset-classic": "3.6.1", "@easyops-cn/docusaurus-search-local": "0.45.0", "@mdx-js/react": "3.0.1", "clsx": "2.1.0", @@ -22,9 +22,9 @@ "react-dom": "18.2.0" }, "devDependencies": { - "@docusaurus/eslint-plugin": "3.6.0", - "@docusaurus/module-type-aliases": "3.6.0", - "@docusaurus/tsconfig": "3.6.0", + "@docusaurus/eslint-plugin": "3.6.1", + "@docusaurus/module-type-aliases": "3.6.1", + "@docusaurus/tsconfig": "3.6.1", "@types/react": "18.2.79", "@typescript-eslint/eslint-plugin": "7.16.1", "hast-util-to-html": "9.0.2", @@ -51,50 +51,41 @@ } }, "node_modules/@algolia/autocomplete-core": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", - "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.7.tgz", + "integrity": "sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q==", "dependencies": { - "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", - "@algolia/autocomplete-shared": "1.9.3" + "@algolia/autocomplete-plugin-algolia-insights": "1.17.7", + "@algolia/autocomplete-shared": "1.17.7" } }, "node_modules/@algolia/autocomplete-plugin-algolia-insights": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", - "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.7.tgz", + "integrity": "sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A==", "dependencies": { - "@algolia/autocomplete-shared": "1.9.3" + "@algolia/autocomplete-shared": "1.17.7" }, "peerDependencies": { "search-insights": ">= 1 < 3" } }, "node_modules/@algolia/autocomplete-preset-algolia": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.6.tgz", - "integrity": "sha512-Cvg5JENdSCMuClwhJ1ON1/jSuojaYMiUW2KePm18IkdCzPJj/NXojaOxw58RFtQFpJgfVW8h2E8mEoDtLlMdeA==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.7.tgz", + "integrity": "sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA==", "dependencies": { - "@algolia/autocomplete-shared": "1.17.6" + "@algolia/autocomplete-shared": "1.17.7" }, "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", "algoliasearch": ">= 4.9.1 < 6" } }, - "node_modules/@algolia/autocomplete-preset-algolia/node_modules/@algolia/autocomplete-shared": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.6.tgz", - "integrity": "sha512-aq/3V9E00Tw2GC/PqgyPGXtqJUlVc17v4cn1EUhSc+O/4zd04Uwb3UmPm8KDaYQQOrkt1lwvCj2vG2wRE5IKhw==", - "peerDependencies": { - "@algolia/client-search": ">= 4.9.1 < 6", - "algoliasearch": ">= 4.9.1 < 6" - } - }, "node_modules/@algolia/autocomplete-shared": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", - "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.7.tgz", + "integrity": "sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg==", "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", "algoliasearch": ">= 4.9.1 < 6" @@ -122,14 +113,14 @@ } }, "node_modules/@algolia/client-abtesting": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.12.0.tgz", - "integrity": "sha512-hx4eVydkm3yrFCFxmcBtSzI/ykt0cZ6sDWch+v3JTgKpD2WtosMJU3Upv1AjQ4B6COSHCOWEX3vfFxW6OoH6aA==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.14.2.tgz", + "integrity": "sha512-7fq1tWIy1aNJEaNHxWy3EwDkuo4k22+NBnxq9QlYVSLLXtr6HqmAm6bQgNNzGT3vm21iKqWO9efk+HIhEM1SzQ==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" @@ -195,22 +186,22 @@ } }, "node_modules/@algolia/client-common": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.12.0.tgz", - "integrity": "sha512-od3WmO8qxyfNhKc+K3D17tvun3IMs/xMNmxCG9MiElAkYVbPPTRUYMkRneCpmJyQI0hNx2/EA4kZgzVfQjO86Q==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.14.2.tgz", + "integrity": "sha512-BW1Qzhh9tMKEsWSQQsiOEcHAd6g7zxq9RpPVmyxbDO/O4eA4vyN+Qz5Jzo686kuYdIQKqIPCEtob/JM89tk57g==", "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-insights": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.12.0.tgz", - "integrity": "sha512-8alajmsYUd+7vfX5lpRNdxqv3Xx9clIHLUItyQK0Z6gwGMbVEFe6YYhgDtwslMAP0y6b0WeJEIZJMLgT7VYpRw==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.14.2.tgz", + "integrity": "sha512-17zg6pqifKORvvrMIqW6HhwUry9RKRXLgADrgFjZ6PZvGB4oVs12dwRG2/HMrIlpxd9cjeQfdlEgHj6lbAf6QA==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" @@ -236,28 +227,28 @@ } }, "node_modules/@algolia/client-query-suggestions": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.12.0.tgz", - "integrity": "sha512-Q5CszzGWfxbIDs9DJ/QJsL7bP6h+lJMg27KxieEnI9KGCu0Jt5iFA3GkREkgRZxRdzlHbZKkrIzhtHVbSHw/rg==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.14.2.tgz", + "integrity": "sha512-gvCX/cczU76Bu1sGcxxTdoIwxe+FnuC1IlW9SF/gzxd3ZzsgzBpzD2puIJqt9fHQsjLxVGkJqKev2FtExnJYZg==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-search": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.12.0.tgz", - "integrity": "sha512-R3qzEytgVLHOGNri+bpta6NtTt7YtkvUe/QBcAmMDjW4Jk1P0eBYIPfvnzIPbINRsLxIq9fZs9uAYBgsrts4Zg==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.14.2.tgz", + "integrity": "sha512-0imdBZDjqxrshw0+eyJUgnkRAbS2W93UQ3BVj8VjN4xQylIMf0fWs72W7MZFdHlH78JJYydevgzqvGMcV0Z1CA==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" @@ -269,14 +260,14 @@ "integrity": "sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==" }, "node_modules/@algolia/ingestion": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.12.0.tgz", - "integrity": "sha512-zpHo6qhR22tL8FsdSI4DvEraPDi/019HmMrCFB/TUX98yzh5ooAU7sNW0qPL1I7+S++VbBmNzJOEU9VI8tEC8A==", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.14.2.tgz", + "integrity": "sha512-/p4rBNkW0fgCpCwrwre+jHfzlFQsLemgaAQqyui8NPxw95Wgf3p+DKxYzcmh8dygT7ub7FwztTW+uURLX1uqIQ==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" @@ -296,14 +287,14 @@ } }, "node_modules/@algolia/monitoring": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.12.0.tgz", - "integrity": "sha512-i2AJZED/zf4uhxezAJUhMKoL5QoepCBp2ynOYol0N76+TSoohaMADdPnWCqOULF4RzOwrG8wWynAwBlXsAI1RQ==", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.14.2.tgz", + "integrity": "sha512-81R57Y/mS0uNhWpu6cNEfkbkADLW4bP0BNjuPpxAypobv7WzYycUnbMvv1YkN6OsociB4+3M7HfsVzj4Nc09vA==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" @@ -363,11 +354,11 @@ } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.12.0.tgz", - "integrity": "sha512-KxwleraFuVoEGCoeW6Y1RAEbgBMS7SavqeyzWdtkJc6mXeCOJXn1iZitb8Tyn2FcpMNUKlSm0adrUTt7G47+Ow==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.14.2.tgz", + "integrity": "sha512-irUvkK+TGBhyivtNCIIbVgNUgbUoHOSk8m/kFX4ddto/PUPmLFRRNNnMHtJ1+OzrJ/uD3Am4FUK2Yt+xgQr05w==", "dependencies": { - "@algolia/client-common": "5.12.0" + "@algolia/client-common": "5.14.2" }, "engines": { "node": ">= 14.0.0" @@ -379,22 +370,22 @@ "integrity": "sha512-k3CXJ2OVnvgE3HMwcojpvY6d9kgKMPRxs/kVohrwF5WMr2fnqojnycZkxPoEg+bXm8fi5BBfFmOqgYztRtHsQA==" }, "node_modules/@algolia/requester-fetch": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.12.0.tgz", - "integrity": "sha512-FuDZXUGU1pAg2HCnrt8+q1VGHKChV/LhvjvZlLOT7e56GJie6p+EuLu4/hMKPOVuQQ8XXtrTHKIU3Lw+7O5/bQ==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.14.2.tgz", + "integrity": "sha512-UNBg5mM4MIYdxPuVjyDL22BC6P87g7WuM91Z1Ky0J19aEGvCSF+oR+9autthROFXdRnAa1rACOjuqn95iBbKpw==", "dependencies": { - "@algolia/client-common": "5.12.0" + "@algolia/client-common": "5.14.2" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-node-http": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.12.0.tgz", - "integrity": "sha512-ncDDY7CxZhMs6LIoPl+vHFQceIBhYPY5EfuGF1V7beO0U38xfsCYEyutEFB2kRzf4D9Gqppn3iWX71sNtrKcuw==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.14.2.tgz", + "integrity": "sha512-CTFA03YiLcnpP+JoLRqjHt5pqDHuKWJpLsIBY/60Gmw8pjALZ3TwvbAquRX4Vy+yrin178NxMuU+ilZ54f2IrQ==", "dependencies": { - "@algolia/client-common": "5.12.0" + "@algolia/client-common": "5.14.2" }, "engines": { "node": ">= 14.0.0" @@ -2143,19 +2134,19 @@ } }, "node_modules/@docsearch/css": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.3.tgz", - "integrity": "sha512-3uvbg8E7rhqE1C4oBAK3tGlS2qfhi9zpfZgH/yjDPF73vd9B41urVIKujF4rczcF4E3qs34SedhehiDJ4UdNBA==" + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.8.0.tgz", + "integrity": "sha512-pieeipSOW4sQ0+bE5UFC51AOZp9NGxg89wAlZ1BAQFaiRAGK1IKUaPQ0UGZeNctJXyqZ1UvBtOQh2HH+U5GtmA==" }, "node_modules/@docsearch/react": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.3.tgz", - "integrity": "sha512-2munr4uBuZq1PG+Ge+F+ldIdxb3Wi8OmEIv2tQQb4RvEvvph+xtQkxwHzVIEnt5s+HecwucuXwB+3JhcZboFLg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.8.0.tgz", + "integrity": "sha512-WnFK720+iwTVt94CxY3u+FgX6exb3BfN5kE9xUY6uuAH/9W/UFboBZFLlrw/zxFRHoHZCOXRtOylsXF+6LHI+Q==", "dependencies": { - "@algolia/autocomplete-core": "1.9.3", - "@algolia/autocomplete-preset-algolia": "1.17.6", - "@docsearch/css": "3.6.3", - "algoliasearch": "^5.11.0" + "@algolia/autocomplete-core": "1.17.7", + "@algolia/autocomplete-preset-algolia": "1.17.7", + "@docsearch/css": "3.8.0", + "algoliasearch": "^5.12.0" }, "peerDependencies": { "@types/react": ">= 16.8.0 < 19.0.0", @@ -2179,74 +2170,74 @@ } }, "node_modules/@docsearch/react/node_modules/@algolia/client-analytics": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.12.0.tgz", - "integrity": "sha512-EpTsSv6IW8maCfXCDIptgT7+mQJj7pImEkcNUnxR8yUKAHzTogTXv9yGm2WXOZFVuwstd2i0sImhQ1Vz8RH/hA==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.14.2.tgz", + "integrity": "sha512-5Nm5cOOyAGcY+hKNJVmR2jgoGn1nvoANS8W5EfB8yAaUqUxL3lFNUHSkFafAMTCOcVKNDkZQYjUDbOOfdYJLqw==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@docsearch/react/node_modules/@algolia/client-personalization": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.12.0.tgz", - "integrity": "sha512-bUV9HtfkTBgpoVhxFrMkmVPG03ZN1Rtn51kiaEtukucdk3ggjR9Qu1YUfRSU2lFgxr9qJc8lTxwfvhjCeJRcqw==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.14.2.tgz", + "integrity": "sha512-5IYt8vbmTA52xyuaZKFwiRoDPeh7hiOC9aBZqqp9fVs6BU01djI/T8pGJXawvwczltCPYzNsdbllV3rqiDbxmQ==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@docsearch/react/node_modules/@algolia/recommend": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.12.0.tgz", - "integrity": "sha512-0jmZyKvYnB/Bj5c7WKsKedOUjnr0UtXm0LVFUdQrxXfqOqvWv9n6Vpr65UjdYG4Q49kRQxhlwtal9WJYrYymXg==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.14.2.tgz", + "integrity": "sha512-OwELnAZxCUyfjYjqsrFmC7Vfa12kqwbDdLUV0oi4j+4pxDsfPgkiZ6iCH2uPw6X8VK88Hl3InPt+RPaZvcrCWg==", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@docsearch/react/node_modules/algoliasearch": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.12.0.tgz", - "integrity": "sha512-psGBRYdGgik8I6m28iAB8xpubvjEt7UQU+w5MAJUA2324WHiGoHap5BPkkjB14rMaXeRts6pmOsrVIglGyOVwg==", - "dependencies": { - "@algolia/client-abtesting": "5.12.0", - "@algolia/client-analytics": "5.12.0", - "@algolia/client-common": "5.12.0", - "@algolia/client-insights": "5.12.0", - "@algolia/client-personalization": "5.12.0", - "@algolia/client-query-suggestions": "5.12.0", - "@algolia/client-search": "5.12.0", - "@algolia/ingestion": "1.12.0", - "@algolia/monitoring": "1.12.0", - "@algolia/recommend": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.14.2.tgz", + "integrity": "sha512-aYjI4WLamMxbhdJ2QAA99VbDCJOGzMOdT2agh57bi40n86ufkhZSIAf6mkocr7NmtBLtwCnSHvD5NJ+Ky5elWw==", + "dependencies": { + "@algolia/client-abtesting": "5.14.2", + "@algolia/client-analytics": "5.14.2", + "@algolia/client-common": "5.14.2", + "@algolia/client-insights": "5.14.2", + "@algolia/client-personalization": "5.14.2", + "@algolia/client-query-suggestions": "5.14.2", + "@algolia/client-search": "5.14.2", + "@algolia/ingestion": "1.14.2", + "@algolia/monitoring": "1.14.2", + "@algolia/recommend": "5.14.2", + "@algolia/requester-browser-xhr": "5.14.2", + "@algolia/requester-fetch": "5.14.2", + "@algolia/requester-node-http": "5.14.2" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@docusaurus/babel": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/babel/-/babel-3.6.0.tgz", - "integrity": "sha512-7CsoQFiadoq7AHSUIQNkI/lGfg9AQ2ZBzsf9BqfZGXkHwWDy6twuohEaG0PgQv1npSRSAB2dioVxhRSErnqKNA==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/babel/-/babel-3.6.1.tgz", + "integrity": "sha512-JcKaunW8Ml2nTnfnvFc55T00Y+aCpNWnf1KY/gG+wWxHYDH0IdXOOz+k6NAlEAerW8+VYLfUqRIqHZ7N/DVXvQ==", "dependencies": { "@babel/core": "^7.25.9", "@babel/generator": "^7.25.9", @@ -2258,8 +2249,8 @@ "@babel/runtime": "^7.25.9", "@babel/runtime-corejs3": "^7.25.9", "@babel/traverse": "^7.25.9", - "@docusaurus/logger": "3.6.0", - "@docusaurus/utils": "3.6.0", + "@docusaurus/logger": "3.6.1", + "@docusaurus/utils": "3.6.1", "babel-plugin-dynamic-import-node": "^2.3.3", "fs-extra": "^11.1.1", "tslib": "^2.6.0" @@ -2269,16 +2260,16 @@ } }, "node_modules/@docusaurus/bundler": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/bundler/-/bundler-3.6.0.tgz", - "integrity": "sha512-o5T9HXkPKH0OQAifTxEXaebcO8kaz3tU1+wlIShZ2DKJHlsyWX3N4rToWBHroWnV/ZCT2XN3kLRzXASqrnb9Tw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/bundler/-/bundler-3.6.1.tgz", + "integrity": "sha512-vHSEx8Ku9x/gfIC6k4xb8J2nTxagLia0KvZkPZhxfkD1+n8i+Dj4BZPWTmv+kCA17RbgAvECG0XRZ0/ZEspQBQ==", "dependencies": { "@babel/core": "^7.25.9", - "@docusaurus/babel": "3.6.0", - "@docusaurus/cssnano-preset": "3.6.0", - "@docusaurus/logger": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils": "3.6.0", + "@docusaurus/babel": "3.6.1", + "@docusaurus/cssnano-preset": "3.6.1", + "@docusaurus/logger": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils": "3.6.1", "autoprefixer": "^10.4.14", "babel-loader": "^9.2.1", "clean-css": "^5.3.2", @@ -2303,7 +2294,7 @@ "node": ">=18.0" }, "peerDependencies": { - "@docusaurus/faster": "3.5.2" + "@docusaurus/faster": "*" }, "peerDependenciesMeta": { "@docusaurus/faster": { @@ -2312,17 +2303,17 @@ } }, "node_modules/@docusaurus/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.6.0.tgz", - "integrity": "sha512-lvRgMoKJJSRDt9+HhAqFcICV4kp/mw1cJJrLxIw4Q2XZnFGM1XUuwcbuaqWmGog+NcOLZaPCcCtZbn60EMCtjQ==", - "dependencies": { - "@docusaurus/babel": "3.6.0", - "@docusaurus/bundler": "3.6.0", - "@docusaurus/logger": "3.6.0", - "@docusaurus/mdx-loader": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-common": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.6.1.tgz", + "integrity": "sha512-cDKxPihiM2z7G+4QtpTczS7uxNfNG6naSqM65OmAJET0CFRHbc9mDlLFtQF0lsVES91SHqfcGaaLZmi2FjdwWA==", + "dependencies": { + "@docusaurus/babel": "3.6.1", + "@docusaurus/bundler": "3.6.1", + "@docusaurus/logger": "3.6.1", + "@docusaurus/mdx-loader": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-common": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "boxen": "^6.2.1", "chalk": "^4.1.2", "chokidar": "^3.5.3", @@ -2386,9 +2377,9 @@ } }, "node_modules/@docusaurus/cssnano-preset": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.6.0.tgz", - "integrity": "sha512-h3jlOXqqzNSoU+C4CZLNpFtD+v2xr1UBf4idZpwMgqid9r6lb5GS7tWKnQnauio6OipacbHbDXEX3JyT1PlDkg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.6.1.tgz", + "integrity": "sha512-ZxYUmNeyQHW2w4/PJ7d07jQDuxzmKr9uPAQ6IVe5dTkeIeV0mDBB3jOLeJkNoI42Ru9JKEqQ9aVDtM9ct6QHnw==", "dependencies": { "cssnano-preset-advanced": "^6.1.2", "postcss": "^8.4.38", @@ -2400,9 +2391,9 @@ } }, "node_modules/@docusaurus/eslint-plugin": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/eslint-plugin/-/eslint-plugin-3.6.0.tgz", - "integrity": "sha512-ILTdyegGbX0pbjDc2mqerO8WsCO7NBAsH/HOMoN6VvfV5T9J52rEG4DfGZXFAKAGLsH9J5Ct7vkTb5jTViZK2Q==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/eslint-plugin/-/eslint-plugin-3.6.1.tgz", + "integrity": "sha512-yo2DKHlF+fFP3Qml0ORXUAnQFKlbmXZxqbQKk9ZahlErGLQwqYTYJxK/gZrDwk2Tvrv0jSSisProkXH26vVTNw==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.62.0", @@ -2416,9 +2407,9 @@ } }, "node_modules/@docusaurus/logger": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.6.0.tgz", - "integrity": "sha512-BcQhoXilXW0607cH/kO6P5Gt5KxCGfoJ+QDKNf3yO2S09/RsITlW+0QljXPbI3DklTrHrhRDmgGk1yX4nUhWTA==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.6.1.tgz", + "integrity": "sha512-OvetI/nnOMBSqCkUzKAQhnIjhxduECK4qTu3tq/8/h/qqvLsvKURojm04WPE54L+Uy+UXMas0hnbBJd8zDlEOw==", "dependencies": { "chalk": "^4.1.2", "tslib": "^2.6.0" @@ -2428,11 +2419,11 @@ } }, "node_modules/@docusaurus/lqip-loader": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/lqip-loader/-/lqip-loader-3.6.0.tgz", - "integrity": "sha512-jEQjnKAjhgyZ/aQf0Tbl3eDpp1j0C/GojE/cv2Bad89o+luV1OAOs9UHDRyKwWQfN+se0D9kFxkfsfwYxMpI8A==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/lqip-loader/-/lqip-loader-3.6.1.tgz", + "integrity": "sha512-H/VVvnvFupFhQ81FuTyA/XHxEZPKh99T6Wg6KgN+/yvcn7869RdgrlDhKDnXZ7j2u80eFsVNjAcPfW1cSAtK6A==", "dependencies": { - "@docusaurus/logger": "3.6.0", + "@docusaurus/logger": "3.6.1", "file-loader": "^6.2.0", "lodash": "^4.17.21", "sharp": "^0.32.3", @@ -2443,13 +2434,13 @@ } }, "node_modules/@docusaurus/mdx-loader": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.6.0.tgz", - "integrity": "sha512-GhRzL1Af/AdSSrGesSPOU/iP/aXadTGmVKuysCxZDrQR2RtBtubQZ9aw+KvdFVV7R4K/CsbgD6J5oqrXlEPk3Q==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.6.1.tgz", + "integrity": "sha512-KPIsYi0S3X3/rNrW3V1fgOu5t6ahYWc31zTHHod8pacFxdmk9Uf6uuw+Jd6Cly1ilgal+41Ku+s0gmMuqKqiqg==", "dependencies": { - "@docusaurus/logger": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "@docusaurus/logger": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "@mdx-js/mdx": "^3.0.0", "@slorber/remark-comment": "^1.0.0", "escape-html": "^1.0.3", @@ -2481,11 +2472,11 @@ } }, "node_modules/@docusaurus/module-type-aliases": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.6.0.tgz", - "integrity": "sha512-szTrIN/6/fuk0xkf3XbRfdTFJzRQ8d1s3sQj5++58wltrT7v3yn1149oc9ryYjMpRcbsarGloQwMu7ofPe4XPg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.6.1.tgz", + "integrity": "sha512-J+q1jgm7TnEfVIUZImSFeLA1rghb6nwtoB9siHdcgKpDqFJ9/S7xhQL2aEKE7iZMZYzpu+2F390E9A7GkdEJNA==", "dependencies": { - "@docusaurus/types": "3.6.0", + "@docusaurus/types": "3.6.1", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -2499,18 +2490,18 @@ } }, "node_modules/@docusaurus/plugin-content-blog": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.6.0.tgz", - "integrity": "sha512-o4aT1/E0Ldpzs/hQff5uyoSriAhS/yqBhqSn+fvSw465AaqRsva6O7CZSYleuBq6x2bewyE3QJq2PcTiHhAd8g==", - "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/logger": "3.6.0", - "@docusaurus/mdx-loader": "3.6.0", - "@docusaurus/theme-common": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-common": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.6.1.tgz", + "integrity": "sha512-FUmsn3xg/XD/K/4FQd8XHrs92aQdZO5LUtpHnRvO1/6DY87SMz6B6ERAN9IGQQld//M2/LVTHkZy8oVhQZQHIQ==", + "dependencies": { + "@docusaurus/core": "3.6.1", + "@docusaurus/logger": "3.6.1", + "@docusaurus/mdx-loader": "3.6.1", + "@docusaurus/theme-common": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-common": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "cheerio": "1.0.0-rc.12", "feed": "^4.2.2", "fs-extra": "^11.1.1", @@ -2532,19 +2523,19 @@ } }, "node_modules/@docusaurus/plugin-content-docs": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.6.0.tgz", - "integrity": "sha512-c5gZOxocJKO/Zev2MEZInli+b+VNswDGuKHE6QtFgidhAJonwjh2kwj967RvWFaMMk62HlLJLZ+IGK2XsVy4Aw==", - "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/logger": "3.6.0", - "@docusaurus/mdx-loader": "3.6.0", - "@docusaurus/module-type-aliases": "3.6.0", - "@docusaurus/theme-common": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-common": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.6.1.tgz", + "integrity": "sha512-Uq8kyn5DYCDmkUlB9sWChhWghS4lUFNiQU+RXcAXJ3qCVXsBpPsh6RF+npQG1N+j4wAbjydM1iLLJJzp+x3eMQ==", + "dependencies": { + "@docusaurus/core": "3.6.1", + "@docusaurus/logger": "3.6.1", + "@docusaurus/mdx-loader": "3.6.1", + "@docusaurus/module-type-aliases": "3.6.1", + "@docusaurus/theme-common": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-common": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "@types/react-router-config": "^5.0.7", "combine-promises": "^1.1.0", "fs-extra": "^11.1.1", @@ -2563,15 +2554,15 @@ } }, "node_modules/@docusaurus/plugin-content-pages": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.6.0.tgz", - "integrity": "sha512-RKHhJrfkadHc7+tt1cP48NWifOrhkSRMPdXNYytzhoQrXlP6Ph+3tfQ4/n+nT0S3Y9+wwRxYqRqA380ZLt+QtQ==", - "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/mdx-loader": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.6.1.tgz", + "integrity": "sha512-TZtL+2zq20gqGalzoIT2rEF1T4YCZ26jTvlCJXs78+incIajfdHtmdOq7rQW0oV7oqTjpGllbp788nY/vY9jgw==", + "dependencies": { + "@docusaurus/core": "3.6.1", + "@docusaurus/mdx-loader": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "fs-extra": "^11.1.1", "tslib": "^2.6.0", "webpack": "^5.88.1" @@ -2585,13 +2576,13 @@ } }, "node_modules/@docusaurus/plugin-debug": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.6.0.tgz", - "integrity": "sha512-o8T1Rl94COLdSlKvjYLQpRJQRU8WWZ8EX1B0yV0dQLNN8reyH7MQW+6z1ig4sQFfH3pnjPWVGHfuEjcib5m7Eg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.6.1.tgz", + "integrity": "sha512-DeKPZtoVExDSYCbzoz7y5Dhc6+YPqRWfVGwEEUyKopSyQYefp0OV8hvASmbJCn2WyThRgspOUhog3FSEhz+agw==", "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils": "3.6.0", + "@docusaurus/core": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils": "3.6.1", "fs-extra": "^11.1.1", "react-json-view-lite": "^1.2.0", "tslib": "^2.6.0" @@ -2605,13 +2596,13 @@ } }, "node_modules/@docusaurus/plugin-google-analytics": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.6.0.tgz", - "integrity": "sha512-kgRFbfpi6Hshj75YUztKyEMtI/kw0trPRwoTN4g+W1NK99R/vh8phTvhBTIMnDbetU79795LkwfG0rZ/ce6zWQ==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.6.1.tgz", + "integrity": "sha512-ZEoERiDHxSfhaEeT35ukQ892NzGHWiUvfxUsnPiRuGEhMoQlxMSp60shBuSZ1sUKuZlndoEl5qAXJg09Wls/Sg==", "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "@docusaurus/core": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "tslib": "^2.6.0" }, "engines": { @@ -2623,13 +2614,13 @@ } }, "node_modules/@docusaurus/plugin-google-gtag": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.6.0.tgz", - "integrity": "sha512-nqu4IfjaO4UX+dojHL2BxHRS+sKj31CIMWYo49huQ3wTET0Oc3u/WGTaKd3ShTPDhkgiRhTOSTPUwJWrU55nHg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.6.1.tgz", + "integrity": "sha512-u/E9vXUsZxYaV6Brvfee8NiH/iR0cMml9P/ifz4EpH/Jfxdbw8rbCT0Nm/h7EFgEY48Uqkl5huSbIvFB9n8aTQ==", "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "@docusaurus/core": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "@types/gtag.js": "^0.0.12", "tslib": "^2.6.0" }, @@ -2642,13 +2633,13 @@ } }, "node_modules/@docusaurus/plugin-google-tag-manager": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.6.0.tgz", - "integrity": "sha512-OU6c5xI0nOVbEc9eImGvvsgNWe4vGm97t/W3aLHjWsHyNk3uwFNBQMHRvBUwAi9k/K3kyC5E7DWnc67REhdLOw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.6.1.tgz", + "integrity": "sha512-By+NKkGYV8tSo8/RyS1OXikOtqsko5jJZ/uioJfBjsBGgSbiMJ+Y/HogFBke0mgSvf7NPGKZTbYm5+FJ8YUtPQ==", "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "@docusaurus/core": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "tslib": "^2.6.0" }, "engines": { @@ -2660,16 +2651,16 @@ } }, "node_modules/@docusaurus/plugin-ideal-image": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-ideal-image/-/plugin-ideal-image-3.6.0.tgz", - "integrity": "sha512-6BaZU7mX+RH+lRFPm5nj3GGfAsjsJ1JHjp0Xjb4ilfte7L2IZkTl6MPpvAzyPC0qIUxfXRcJs4qd/HUE0xcTlw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-ideal-image/-/plugin-ideal-image-3.6.1.tgz", + "integrity": "sha512-hiGRPPlsM02aEOPlQc9rVnrckbVR6HswG7yDpZOtBEhw+ysXFsl/8gzAxFBL4ogKjN28WrlMCn/6IIkxY/EyOQ==", "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/lqip-loader": "3.6.0", + "@docusaurus/core": "3.6.1", + "@docusaurus/lqip-loader": "3.6.1", "@docusaurus/responsive-loader": "^1.7.0", - "@docusaurus/theme-translations": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "@docusaurus/theme-translations": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "@slorber/react-ideal-image": "^0.0.12", "react-waypoint": "^10.3.0", "sharp": "^0.32.3", @@ -2691,16 +2682,16 @@ } }, "node_modules/@docusaurus/plugin-sitemap": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.6.0.tgz", - "integrity": "sha512-YB5XMdf9FjLhgbHY/cDbYhVxsgcpPIjxY9769HUgFOB7GVzItTLOR71W035R1BiR2CA5QAn3XOSg36WLRxlhQQ==", - "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/logger": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-common": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.6.1.tgz", + "integrity": "sha512-i8R/GTKew4Cufb+7YQTwfPcNOhKTJzZ1VZ5OqQwI9c3pZK2TltQyhqKDVN94KCTbSSKvOYYytYfRAB2uPnH1/A==", + "dependencies": { + "@docusaurus/core": "3.6.1", + "@docusaurus/logger": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-common": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "fs-extra": "^11.1.1", "sitemap": "^7.1.1", "tslib": "^2.6.0" @@ -2714,23 +2705,23 @@ } }, "node_modules/@docusaurus/preset-classic": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.6.0.tgz", - "integrity": "sha512-kpGNdQzr/Dpm7o3b1iaQrz4DMDx3WIeBbl4V4P4maa2zAQkTdlaP4CMgA5oKrRrpqPLnQFsUM/b+qf2glhl2Tw==", - "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/plugin-content-blog": "3.6.0", - "@docusaurus/plugin-content-docs": "3.6.0", - "@docusaurus/plugin-content-pages": "3.6.0", - "@docusaurus/plugin-debug": "3.6.0", - "@docusaurus/plugin-google-analytics": "3.6.0", - "@docusaurus/plugin-google-gtag": "3.6.0", - "@docusaurus/plugin-google-tag-manager": "3.6.0", - "@docusaurus/plugin-sitemap": "3.6.0", - "@docusaurus/theme-classic": "3.6.0", - "@docusaurus/theme-common": "3.6.0", - "@docusaurus/theme-search-algolia": "3.6.0", - "@docusaurus/types": "3.6.0" + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.6.1.tgz", + "integrity": "sha512-b90Y1XRH9e+oa/E3NmiFEFOwgYUd+knFcZUy81nM3FJs038WbEA0T55NQsuPW0s7nOsCShQ7dVFyKxV+Wp31Nw==", + "dependencies": { + "@docusaurus/core": "3.6.1", + "@docusaurus/plugin-content-blog": "3.6.1", + "@docusaurus/plugin-content-docs": "3.6.1", + "@docusaurus/plugin-content-pages": "3.6.1", + "@docusaurus/plugin-debug": "3.6.1", + "@docusaurus/plugin-google-analytics": "3.6.1", + "@docusaurus/plugin-google-gtag": "3.6.1", + "@docusaurus/plugin-google-tag-manager": "3.6.1", + "@docusaurus/plugin-sitemap": "3.6.1", + "@docusaurus/theme-classic": "3.6.1", + "@docusaurus/theme-common": "3.6.1", + "@docusaurus/theme-search-algolia": "3.6.1", + "@docusaurus/types": "3.6.1" }, "engines": { "node": ">=18.0" @@ -2764,23 +2755,23 @@ } }, "node_modules/@docusaurus/theme-classic": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.6.0.tgz", - "integrity": "sha512-sAXNfwPL6uRD+BuHuKXZfAXud7SS7IK/JdrPuzyQxdO1gJKzI5GFfe1ED1QoJDNWJWJ01JHE5rSnwYLEADc2rQ==", - "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/logger": "3.6.0", - "@docusaurus/mdx-loader": "3.6.0", - "@docusaurus/module-type-aliases": "3.6.0", - "@docusaurus/plugin-content-blog": "3.6.0", - "@docusaurus/plugin-content-docs": "3.6.0", - "@docusaurus/plugin-content-pages": "3.6.0", - "@docusaurus/theme-common": "3.6.0", - "@docusaurus/theme-translations": "3.6.0", - "@docusaurus/types": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-common": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.6.1.tgz", + "integrity": "sha512-5lVUmIXk7zp+n9Ki2lYWrmhbd6mssOlKCnnDJvY4QDi3EgjRisIu5g4yKXoWTIbiqE7m7q/dS9cbeShEtfkKng==", + "dependencies": { + "@docusaurus/core": "3.6.1", + "@docusaurus/logger": "3.6.1", + "@docusaurus/mdx-loader": "3.6.1", + "@docusaurus/module-type-aliases": "3.6.1", + "@docusaurus/plugin-content-blog": "3.6.1", + "@docusaurus/plugin-content-docs": "3.6.1", + "@docusaurus/plugin-content-pages": "3.6.1", + "@docusaurus/theme-common": "3.6.1", + "@docusaurus/theme-translations": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-common": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "copy-text-to-clipboard": "^3.2.0", @@ -2804,14 +2795,14 @@ } }, "node_modules/@docusaurus/theme-common": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.6.0.tgz", - "integrity": "sha512-frjlYE5sRs+GuPs4XXlp9aMLI2O4H5FPpznDAXBrCm+8EpWRiIb443ePMxM3IyMCQ5bwFlki0PI9C+r4apstnw==", - "dependencies": { - "@docusaurus/mdx-loader": "3.6.0", - "@docusaurus/module-type-aliases": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-common": "3.6.0", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.6.1.tgz", + "integrity": "sha512-18iEYNpMvarGfq9gVRpGowSZD24vZ39Iz4acqaj64180i54V9el8tVnhNr/wRvrUm1FY30A1NHLqnMnDz4rYEQ==", + "dependencies": { + "@docusaurus/mdx-loader": "3.6.1", + "@docusaurus/module-type-aliases": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-common": "3.6.1", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -2831,18 +2822,18 @@ } }, "node_modules/@docusaurus/theme-search-algolia": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.6.0.tgz", - "integrity": "sha512-4IwRUkxjrisR8LXBHeE4d2btraWdMficbgiVL3UHvJURmyvgzMBZQP8KrK8rjdXeu8SuRxSmeV6NSVomRvdbEg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.6.1.tgz", + "integrity": "sha512-BjmuiFRpQP1WEm8Mzu1Bb0Wdas6G65VHXDDNr7XTKgbstxalE6vuxt0ioXTDFS2YVep5748aVhKvnxR9gm2Liw==", "dependencies": { "@docsearch/react": "^3.5.2", - "@docusaurus/core": "3.6.0", - "@docusaurus/logger": "3.6.0", - "@docusaurus/plugin-content-docs": "3.6.0", - "@docusaurus/theme-common": "3.6.0", - "@docusaurus/theme-translations": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-validation": "3.6.0", + "@docusaurus/core": "3.6.1", + "@docusaurus/logger": "3.6.1", + "@docusaurus/plugin-content-docs": "3.6.1", + "@docusaurus/theme-common": "3.6.1", + "@docusaurus/theme-translations": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-validation": "3.6.1", "algoliasearch": "^4.18.0", "algoliasearch-helper": "^3.13.3", "clsx": "^2.0.0", @@ -2861,9 +2852,9 @@ } }, "node_modules/@docusaurus/theme-translations": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.6.0.tgz", - "integrity": "sha512-L555X8lWE3fv8VaF0Bc1VnAgi10UvRKFcvADHiYR7Gj37ItaWP5i7xLHsSw7fi/SHTXe5wfIeCFNqUYHyCOHAQ==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.6.1.tgz", + "integrity": "sha512-bNm5G6sueUezvyhsBegA1wwM38yW0BnqpZTE9KHO2yKnkERNMaV5x/yPJ/DNCOHjJtCcJ5Uz55g2AS75Go31xA==", "dependencies": { "fs-extra": "^11.1.1", "tslib": "^2.6.0" @@ -2873,15 +2864,15 @@ } }, "node_modules/@docusaurus/tsconfig": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/tsconfig/-/tsconfig-3.6.0.tgz", - "integrity": "sha512-1nHsSMlNgEifnvsL4ql9wx7I1xXhrrNZl65IKD11pdo/749oI9fMcvm47dDwgS57x1WEteIAxJjzidffa5J9TQ==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/tsconfig/-/tsconfig-3.6.1.tgz", + "integrity": "sha512-RvjMG9M9YK8N/I5oudqJed8jjfWGI7csr4XCkGXBToNkkoi2QgkTz2DxH+obKdfLejQaASdIMynYaE5Lv7Qw9Q==", "dev": true }, "node_modules/@docusaurus/types": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.6.0.tgz", - "integrity": "sha512-jADLgoZGWhAzThr+mRiyuFD4OUzt6jHnb7NRArRKorgxckqUBaPyFOau9hhbcSTHtU6ceyeWjN7FDt7uG2Hplw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.6.1.tgz", + "integrity": "sha512-hCB1hj9DYutVYBisnPNobz9SzEmCcf1EetJv09O49Cov3BqOkm+vnnjB3d957YJMtpLGQoKBeN/FF1DZ830JwQ==", "dependencies": { "@mdx-js/mdx": "^3.0.0", "@types/history": "^4.7.11", @@ -2899,12 +2890,13 @@ } }, "node_modules/@docusaurus/utils": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.6.0.tgz", - "integrity": "sha512-VKczAutI4mptiAw/WcYEu5WeVhQ6Q1zdIUl64SGw9K++9lziH+Kt10Ee8l2dMpRkiUk6zzK20kMNlX2WCUwXYQ==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.6.1.tgz", + "integrity": "sha512-nS3WCvepwrnBEgSG5vQu40XG95lC9Jeh/odV5u5IhU1eQFEGDst9xBi6IK5yZdsGvbuaXBZLZtOqWYtuuFa/rQ==", "dependencies": { - "@docusaurus/logger": "3.6.0", - "@docusaurus/utils-common": "3.6.0", + "@docusaurus/logger": "3.6.1", + "@docusaurus/types": "3.6.1", + "@docusaurus/utils-common": "3.6.1", "@svgr/webpack": "^8.1.0", "escape-string-regexp": "^4.0.0", "file-loader": "^6.2.0", @@ -2926,43 +2918,28 @@ }, "engines": { "node": ">=18.0" - }, - "peerDependencies": { - "@docusaurus/types": "*" - }, - "peerDependenciesMeta": { - "@docusaurus/types": { - "optional": true - } } }, "node_modules/@docusaurus/utils-common": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.6.0.tgz", - "integrity": "sha512-diUDNfbw33GaZMmKwdTckT2IBfVouXLXRD+zphH9ywswuaEIKqixvuf5g41H7MBBrlMsxhna3uTMoB4B/OPDcA==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.6.1.tgz", + "integrity": "sha512-LX1qiTiC0aS8c92uZ+Wj2iNCNJyYZJIKY8/nZDKNMBfo759VYVS3RX3fKP3DznB+16sYp7++MyCz/T6fOGaRfw==", "dependencies": { + "@docusaurus/types": "3.6.1", "tslib": "^2.6.0" }, "engines": { "node": ">=18.0" - }, - "peerDependencies": { - "@docusaurus/types": "*" - }, - "peerDependenciesMeta": { - "@docusaurus/types": { - "optional": true - } } }, "node_modules/@docusaurus/utils-validation": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.6.0.tgz", - "integrity": "sha512-CRHiKKJEKA0GFlfOf71JWHl7PtwOyX0+Zg9ep9NFEZv6Lcx3RJ9nhl7p8HRjPL6deyYceavM//BsfW4pCI4BtA==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.6.1.tgz", + "integrity": "sha512-+iMd6zRl5cJQm7nUP+7pSO/oAXsN79eHO34ME7l2YJt4GEAr70l5kkD58u2jEPpp+wSXT70c7x2A2lzJI1E8jw==", "dependencies": { - "@docusaurus/logger": "3.6.0", - "@docusaurus/utils": "3.6.0", - "@docusaurus/utils-common": "3.6.0", + "@docusaurus/logger": "3.6.1", + "@docusaurus/utils": "3.6.1", + "@docusaurus/utils-common": "3.6.1", "fs-extra": "^11.2.0", "joi": "^17.9.2", "js-yaml": "^4.1.0", @@ -6541,9 +6518,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -13447,12 +13424,12 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", - "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.1.0.tgz", + "integrity": "sha512-rm0bdSv4jC3BDma3s9H19ZddW0aHX6EoqwDYU2IfZhRN+53QrufTRo2IdkAbRqLx4R2IYbZnbjKKxg4VN5oU9Q==", "dependencies": { "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^7.0.0", "postcss-value-parser": "^4.1.0" }, "engines": { @@ -13462,12 +13439,24 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-modules-local-by-default/node_modules/postcss-selector-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz", + "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-modules-scope": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", - "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", "dependencies": { - "postcss-selector-parser": "^6.0.4" + "postcss-selector-parser": "^7.0.0" }, "engines": { "node": "^10 || ^12 || >= 14" @@ -13476,6 +13465,18 @@ "postcss": "^8.1.0" } }, + "node_modules/postcss-modules-scope/node_modules/postcss-selector-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz", + "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-modules-values": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", @@ -14171,9 +14172,9 @@ } }, "node_modules/react-dev-utils/node_modules/loader-utils": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", - "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.3.1.tgz", + "integrity": "sha512-FMJTLMXfCLMLfJxcX9PFqX5qD88Z5MRGaZCVzfuqeZSPsyiBzs+pahDQjbIWz2QIzPZz0NX9Zy4FX3lmK6YHIg==", "engines": { "node": ">= 12.13.0" } @@ -15035,9 +15036,9 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/search-insights": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.2.tgz", - "integrity": "sha512-zFNpOpUO+tY2D85KrxJ+aqwnIfdEGi06UH2+xEb+Bp9Mwznmauqc9djbnBibJO5mpfUPPa8st6Sx65+vbeO45g==", + "version": "2.17.3", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", + "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", "peer": true }, "node_modules/section-matter": { @@ -15675,9 +15676,9 @@ } }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==" + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==" }, "node_modules/streamx": { "version": "2.16.1", @@ -16050,18 +16051,6 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/string-width/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", diff --git a/docs/package.json b/docs/package.json index ea4c093e1f..d714bc8398 100644 --- a/docs/package.json +++ b/docs/package.json @@ -18,9 +18,9 @@ "lint": "prettier --ignore-path .gitignore --check . && tsc && eslint --ignore-path .gitignore src && stylelint 'src/**/*.css'" }, "dependencies": { - "@docusaurus/core": "3.6.0", - "@docusaurus/plugin-ideal-image": "3.6.0", - "@docusaurus/preset-classic": "3.6.0", + "@docusaurus/core": "3.6.1", + "@docusaurus/plugin-ideal-image": "3.6.1", + "@docusaurus/preset-classic": "3.6.1", "@easyops-cn/docusaurus-search-local": "0.45.0", "@mdx-js/react": "3.0.1", "clsx": "2.1.0", @@ -32,9 +32,9 @@ "path-to-regexp": "8.2.0" }, "devDependencies": { - "@docusaurus/eslint-plugin": "3.6.0", - "@docusaurus/module-type-aliases": "3.6.0", - "@docusaurus/tsconfig": "3.6.0", + "@docusaurus/eslint-plugin": "3.6.1", + "@docusaurus/module-type-aliases": "3.6.1", + "@docusaurus/tsconfig": "3.6.1", "@types/react": "18.2.79", "@typescript-eslint/eslint-plugin": "7.16.1", "hast-util-to-html": "9.0.2", diff --git a/global.json b/global.json index 4f9e9b79a1..2bc13e80ad 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.401", + "version": "9.0.100", "rollForward": "latestMinor" } } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index cb21d50c73..19240a7a38 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -16,11 +16,11 @@ - + all runtime; build; native; contentfiles; analyzers - + all runtime; build; native; contentfiles; analyzers diff --git a/src/Riok.Mapperly/AnalyzerReleases.Shipped.md b/src/Riok.Mapperly/AnalyzerReleases.Shipped.md index dfc07857f8..b076403705 100644 --- a/src/Riok.Mapperly/AnalyzerReleases.Shipped.md +++ b/src/Riok.Mapperly/AnalyzerReleases.Shipped.md @@ -191,6 +191,8 @@ RMG085 | Mapper | Error | Invalid usage of fallback value RMG086 | Mapper | Error | The source of the explicit mapping from a string to an enum is not of type string RMG087 | Mapper | Error | The target of the explicit mapping from an enum to a string is not of type string RMG088 | Mapper | Info | The attribute to build the name of the enum member is missing +RMG089 | Mapper | Info | Mapping nullable source to non-nullable target member +RMG090 | Mapper | Info | Mapping nullable source type to non-nullable target type ### Removed Rules diff --git a/src/Riok.Mapperly/Descriptors/MappingBodyBuilders/MemberMappingBuilder.cs b/src/Riok.Mapperly/Descriptors/MappingBodyBuilders/MemberMappingBuilder.cs index ba88b1e63d..5648067106 100644 --- a/src/Riok.Mapperly/Descriptors/MappingBodyBuilders/MemberMappingBuilder.cs +++ b/src/Riok.Mapperly/Descriptors/MappingBodyBuilders/MemberMappingBuilder.cs @@ -73,6 +73,7 @@ public static bool TryBuild( var sourceMember = memberMappingInfo.SourceMember!; var targetMember = memberMappingInfo.TargetMember; + if (delegateMapping == null) { ctx.BuilderContext.ReportDiagnostic( @@ -84,6 +85,22 @@ public static bool TryBuild( return false; } + var memberTargetNullable = memberMappingInfo.TargetMember.MemberType.IsNullable(); + var delegateTargetNullable = delegateMapping.TargetType.IsNullable(); + var memberSourceNullable = memberMappingInfo.IsSourceNullable; + var delegateSourceNullable = delegateMapping.SourceType.IsNullable(); + + if (memberSourceNullable && !memberTargetNullable && !(delegateSourceNullable && !delegateTargetNullable)) + { + ctx.BuilderContext.ReportDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + sourceMember.MemberPath.FullName, + sourceMember.MemberPath.RootType.ToDisplayString(), + targetMember.FullName, + targetMember.RootType.ToDisplayString() + ); + } + if (codeStyle == CodeStyle.Statement) { sourceValue = BuildBlockNullHandlingMapping(ctx, delegateMapping, sourceMember.MemberPath, targetMember); diff --git a/src/Riok.Mapperly/Descriptors/MappingBuilders/NullableMappingBuilder.cs b/src/Riok.Mapperly/Descriptors/MappingBuilders/NullableMappingBuilder.cs index 1f4c2c36ef..f27d1b0e71 100644 --- a/src/Riok.Mapperly/Descriptors/MappingBuilders/NullableMappingBuilder.cs +++ b/src/Riok.Mapperly/Descriptors/MappingBuilders/NullableMappingBuilder.cs @@ -1,5 +1,6 @@ using Riok.Mapperly.Descriptors.Mappings; using Riok.Mapperly.Descriptors.Mappings.ExistingTarget; +using Riok.Mapperly.Diagnostics; using Riok.Mapperly.Helpers; namespace Riok.Mapperly.Descriptors.MappingBuilders; @@ -12,6 +13,7 @@ public static class NullableMappingBuilder return null; var delegateMapping = ctx.BuildMapping(mappingKey, MappingBuildingOptions.KeepUserSymbol); + return delegateMapping == null ? null : BuildNullDelegateMapping(ctx, delegateMapping); } @@ -35,12 +37,19 @@ private static bool TryBuildNonNullableMappingKey(MappingBuilderContext ctx, out } mappingKey = new TypeMappingKey(sourceNonNullable ?? ctx.Source, targetNonNullable ?? ctx.Target); + + if (sourceIsNullable && !targetIsNullable) + { + ctx.ReportDiagnostic(DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, ctx.Source, ctx.Target); + } + return true; } private static INewInstanceMapping BuildNullDelegateMapping(MappingBuilderContext ctx, INewInstanceMapping mapping) { var nullFallback = ctx.GetNullFallbackValue(); + return mapping switch { NewInstanceMethodMapping methodMapping => new NullDelegateMethodMapping(ctx.Source, ctx.Target, methodMapping, nullFallback), diff --git a/src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs b/src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs index 2c2b571ff1..cd671a5e77 100644 --- a/src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs +++ b/src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs @@ -827,6 +827,26 @@ public static class DiagnosticDescriptors true ); + public static readonly DiagnosticDescriptor NullableSourceValueToNonNullableTargetValue = + new( + "RMG089", + "Mapping nullable source to non-nullable target member", + "Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable", + DiagnosticCategories.Mapper, + DiagnosticSeverity.Info, + true + ); + + public static readonly DiagnosticDescriptor NullableSourceTypeToNonNullableTargetType = + new( + "RMG090", + "Mapping nullable source type to non-nullable target type", + "Mapping the nullable source of type {0} to target of type {1} which is not nullable", + DiagnosticCategories.Mapper, + DiagnosticSeverity.Info, + true + ); + private static string BuildHelpUri(string id) { #if ENV_NEXT diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 78f6f865da..e6c56cc3dc 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -11,10 +11,10 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -26,11 +26,11 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/test/Riok.Mapperly.IntegrationTests/Riok.Mapperly.IntegrationTests.csproj b/test/Riok.Mapperly.IntegrationTests/Riok.Mapperly.IntegrationTests.csproj index f1b0b4bc70..af4515971f 100644 --- a/test/Riok.Mapperly.IntegrationTests/Riok.Mapperly.IntegrationTests.csproj +++ b/test/Riok.Mapperly.IntegrationTests/Riok.Mapperly.IntegrationTests.csproj @@ -2,7 +2,7 @@ - net8.0 + net9.0 $(MapperlyIntegrationTestsTargetFramework) true @@ -36,18 +36,18 @@ - + - + - - + + all runtime; build; native; contentfiles; analyzers diff --git a/test/Riok.Mapperly.Tests/Mapping/DictionaryTest.cs b/test/Riok.Mapperly.Tests/Mapping/DictionaryTest.cs index 0dc336f513..ae3fa4441d 100644 --- a/test/Riok.Mapperly.Tests/Mapping/DictionaryTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/DictionaryTest.cs @@ -1,4 +1,5 @@ using Riok.Mapperly.Abstractions; +using Riok.Mapperly.Diagnostics; namespace Riok.Mapperly.Tests.Mapping; @@ -72,8 +73,13 @@ public void DictionaryToDictionaryNullableToNonNullable() { var source = TestSourceBuilder.Mapping("Dictionary", "Dictionary"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type int? to target of type int which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::System.Collections.Generic.Dictionary(source.Count); @@ -98,8 +104,13 @@ TestSourceBuilderOptions.Default with } ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type int? to target of type int which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::System.Collections.Generic.Dictionary(source.Count); diff --git a/test/Riok.Mapperly.Tests/Mapping/EnumTest.cs b/test/Riok.Mapperly.Tests/Mapping/EnumTest.cs index 4961995def..90f5fe8259 100644 --- a/test/Riok.Mapperly.Tests/Mapping/EnumTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/EnumTest.cs @@ -229,8 +229,13 @@ public void NullableEnumToOtherEnumShouldCastWithNullHandling() var source = TestSourceBuilder.Mapping("E1?", "E2", "enum E1 {A, B, C}", "enum E2 {A, B, C}"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type E1? to target of type E2 which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( "return source == null ? throw new System.ArgumentNullException(nameof(source)) : (global::E2)source.Value;" ); diff --git a/test/Riok.Mapperly.Tests/Mapping/EnumerableDeepCloningTest.cs b/test/Riok.Mapperly.Tests/Mapping/EnumerableDeepCloningTest.cs index 6198f4c8b4..0b23c8018a 100644 --- a/test/Riok.Mapperly.Tests/Mapping/EnumerableDeepCloningTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/EnumerableDeepCloningTest.cs @@ -1,3 +1,5 @@ +using Riok.Mapperly.Diagnostics; + namespace Riok.Mapperly.Tests.Mapping; public class EnumerableDeepCloningTest @@ -34,8 +36,13 @@ public void ArrayOfNullablePrimitiveTypesToNonNullableArrayDeepCloning() { var source = TestSourceBuilder.Mapping("int?[]", "int[]", TestSourceBuilderOptions.WithDeepCloning); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type int? to target of type int which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new int[source.Length]; diff --git a/test/Riok.Mapperly.Tests/Mapping/EnumerableTest.cs b/test/Riok.Mapperly.Tests/Mapping/EnumerableTest.cs index c3fc1893a5..bf1ed57d3f 100644 --- a/test/Riok.Mapperly.Tests/Mapping/EnumerableTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/EnumerableTest.cs @@ -17,8 +17,13 @@ public void NullableArrayToNonNullableArray() { var source = TestSourceBuilder.Mapping("int[]?", "int[]"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type int[]? to target of type int[] which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody("return source ?? throw new System.ArgumentNullException(nameof(source));"); } @@ -27,8 +32,13 @@ public void ArrayOfNullablePrimitiveTypesToNonNullableArray() { var source = TestSourceBuilder.Mapping("int?[]", "int[]"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type int? to target of type int which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new int[source.Length]; @@ -72,8 +82,13 @@ public void ArrayCustomClassNullableToArrayCustomClassNonNullable() { var source = TestSourceBuilder.Mapping("B?[]", "B[]", "class B { public int Value { get; set; } }"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type B? to target of type B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B[source.Length]; diff --git a/test/Riok.Mapperly.Tests/Mapping/NullableTest.cs b/test/Riok.Mapperly.Tests/Mapping/NullableTest.cs index 143835b81b..9494a90458 100644 --- a/test/Riok.Mapperly.Tests/Mapping/NullableTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/NullableTest.cs @@ -1,3 +1,5 @@ +using Riok.Mapperly.Diagnostics; + namespace Riok.Mapperly.Tests.Mapping; public class NullableTest @@ -8,8 +10,13 @@ public void NullableToNonNullableShouldThrow() var source = TestSourceBuilder.Mapping("A?", "B", "class A { }", "class B { }"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type A? to target of type B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ if (source == null) @@ -76,8 +83,13 @@ TestSourceBuilderOptions.Default with ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type A? to target of type B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ if (source == null) @@ -116,7 +128,15 @@ TestSourceBuilderOptions.Default with "class A { }" ); - TestHelper.GenerateMapper(source).Should().HaveSingleMethodBody("return source == null ? \"\" : source.ToString();"); + TestHelper + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) + .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type A? to target of type string which is not nullable" + ) + .HaveAssertedAllDiagnostics() + .HaveSingleMethodBody("return source == null ? \"\" : source.ToString();"); } [Fact] @@ -131,7 +151,15 @@ TestSourceBuilderOptions.Default with } ); - TestHelper.GenerateMapper(source).Should().HaveSingleMethodBody("return source == null ? default : source.Value;"); + TestHelper + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) + .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type System.DateTime? to target of type System.DateTime which is not nullable" + ) + .HaveAssertedAllDiagnostics() + .HaveSingleMethodBody("return source == null ? default : source.Value;"); } [Fact] diff --git a/test/Riok.Mapperly.Tests/Mapping/ObjectNestedPropertyTest.cs b/test/Riok.Mapperly.Tests/Mapping/ObjectNestedPropertyTest.cs index 39cde38784..c1ef3812be 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ObjectNestedPropertyTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ObjectNestedPropertyTest.cs @@ -246,8 +246,13 @@ public void NullableNestedPropertyWithMemberNameOfSource() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value.Id of A to the target property Id of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); diff --git a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyConstructorResolverTest.cs b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyConstructorResolverTest.cs index 1ad242331b..d9c74f6e21 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyConstructorResolverTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyConstructorResolverTest.cs @@ -1,3 +1,5 @@ +using Riok.Mapperly.Diagnostics; + namespace Riok.Mapperly.Tests.Mapping; public class ObjectPropertyConstructorResolverTest @@ -345,8 +347,13 @@ public void RecordToFlattenedRecordNullablePath() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Nested.Value of A to the target property NestedValue of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B( @@ -394,8 +401,13 @@ TestSourceBuilderOptions.Default with ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Nested.Value of A to the target property NestedValue of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(source.Nested?.Value ?? ""); @@ -426,8 +438,13 @@ public void RecordToRecordNullableToNonNullablePrimitive() var source = TestSourceBuilder.Mapping("A", "B", "record A(int? Value);", "record B(int Value);"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B( @@ -444,8 +461,13 @@ public void RecordToRecordNonDirectAssignmentNullHandling() var source = TestSourceBuilder.Mapping("A", "B", "record A(int? Value);", "record B(double Value);"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B( @@ -462,8 +484,13 @@ public void RecordToRecordFlattenedNonDirectAssignmentNullHandling() var source = TestSourceBuilder.Mapping("A", "B", "record A(C? Nested);", "record B(double NestedValue);", "record C(int Value);"); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Nested.Value of A to the target property NestedValue of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B( diff --git a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyExistingInstanceTest.cs b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyExistingInstanceTest.cs index e4909d1efd..0d642963da 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyExistingInstanceTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyExistingInstanceTest.cs @@ -1,3 +1,5 @@ +using Riok.Mapperly.Diagnostics; + namespace Riok.Mapperly.Tests.Mapping; public class ObjectPropertyExistingInstanceTest @@ -43,6 +45,10 @@ public class D TestHelper .GenerateMapper(source, TestHelperOptions.AllowAndIncludeAllDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value2 of C to the target property Value2 of D which is not nullable" + ) .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ diff --git a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFlatteningTest.cs b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFlatteningTest.cs index 4491c343fd..ed07c765b5 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFlatteningTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFlatteningTest.cs @@ -244,8 +244,13 @@ public void AutoFlattenedPropertyNullablePath() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value.Id of A to the target property ValueId of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); @@ -270,8 +275,17 @@ public void AutoFlattenedMultiplePropertiesNullablePath() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value.Id of A to the target property ValueId of B which is not nullable" + ) + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value.Name of A to the target property ValueName of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); @@ -296,8 +310,13 @@ public void AutoFlattenedPropertyNullableValueTypePath() "public class C { public int? Value { get; set; } }" ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Id.Value of A to the target property IdValue of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); @@ -321,8 +340,13 @@ public void AutoFlattenedPropertyNullableValueTypePathShouldResolve() "public struct C { public int Integer { get; set; } }" ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Prop.Integer of A to the target property PropInteger of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); diff --git a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFromSourceTest.cs b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFromSourceTest.cs index 617858bc48..3de902da37 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFromSourceTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFromSourceTest.cs @@ -195,8 +195,13 @@ public void NullableNestedPropertyWithMemberNameOfSource() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceTypeToNonNullableTargetType, + "Mapping the nullable source of type A? to target of type B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ if (source == null) diff --git a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyInitPropertyTest.cs b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyInitPropertyTest.cs index ccc3a49370..0e0b1c6562 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyInitPropertyTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyInitPropertyTest.cs @@ -65,8 +65,13 @@ public void InitOnlyPropertyWithNullableSource() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B() @@ -93,8 +98,13 @@ TestSourceBuilderOptions.Default with ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B() @@ -165,8 +175,13 @@ public void InitOnlyPropertyWithAutoFlattenedNullablePath() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Nested.Value of A to the target property NestedValue of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B() diff --git a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyNullableTest.cs b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyNullableTest.cs index 7fd5853a59..06c74959d3 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyNullableTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyNullableTest.cs @@ -37,8 +37,13 @@ public void NullableIntToNonNullableIntProperty() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); @@ -66,8 +71,13 @@ TestSourceBuilderOptions.Default with ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); @@ -96,8 +106,13 @@ TestSourceBuilderOptions.Default with ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); @@ -125,8 +140,13 @@ public void NullableStringToNonNullableStringProperty() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); @@ -152,8 +172,13 @@ public void NullableClassToNonNullableClassProperty() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ var target = new global::B(); @@ -409,8 +434,13 @@ public void DisabledNullableClassPropertyToNonNullableProperty() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ var target = new global::B(); @@ -500,8 +530,13 @@ TestSourceBuilderOptions.Default with ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value of A to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ var target = new global::B(); @@ -618,6 +653,10 @@ TestSourceBuilderOptions.Default with DiagnosticDescriptors.SourceMemberNotMapped, "The member Flattened on the mapping source type C is not mapped to any member on the mapping target type D" ) + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Value.Flattened of A to the target property ValueFlattened of B which is not nullable" + ) .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ @@ -718,8 +757,13 @@ public void ShouldUseUserImplementedMappingWithNonNullableValueType() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property Test of TypeWithNullableProperty to the target property Test of NotNullableType which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ if (y == null) diff --git a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyTest.cs b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyTest.cs index 0599979b21..6bec33d801 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ObjectPropertyTest.cs @@ -194,8 +194,17 @@ TestSourceBuilderOptions.Default with ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property StringValue1 of A to the target property StringValue of B which is not nullable" + ) + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property StringValue2 of A to the target property StringValue of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveSingleMethodBody( """ var target = new global::B(); @@ -323,6 +332,26 @@ public Task WithUnmappablePropertyShouldDiagnostic() return TestHelper.VerifyGenerator(source); } + [Fact] + public void NullableToNonNullablePropertyShouldDiagnostic() + { + var source = TestSourceBuilder.Mapping( + "A", + "B", + "class A { public string? StringValue { get; set; } }", + "class B { public string StringValue { get; set; } }" + ); + + TestHelper + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) + .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property StringValue of A to the target property StringValue of B which is not nullable" + ) + .HaveAssertedAllDiagnostics(); + } + [Fact] public Task WithManualNotFoundTargetPropertyShouldDiagnostic() { diff --git a/test/Riok.Mapperly.Tests/Mapping/UserMethodAdditionalParametersTest.cs b/test/Riok.Mapperly.Tests/Mapping/UserMethodAdditionalParametersTest.cs index 92cb8ed0a0..eac03d7fd8 100644 --- a/test/Riok.Mapperly.Tests/Mapping/UserMethodAdditionalParametersTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/UserMethodAdditionalParametersTest.cs @@ -62,8 +62,13 @@ public void AdditionalInitNullableIntParameter() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property value of int? to the target property Value of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ var target = new global::B() @@ -152,8 +157,13 @@ public void NullableClassFlattening() ); TestHelper - .GenerateMapper(source) + .GenerateMapper(source, TestHelperOptions.AllowDiagnostics) .Should() + .HaveDiagnostic( + DiagnosticDescriptors.NullableSourceValueToNonNullableTargetValue, + "Mapping the nullable source property nested.Value of C? to the target property NestedValue of B which is not nullable" + ) + .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ var target = new global::B() diff --git a/test/Riok.Mapperly.Tests/Riok.Mapperly.Tests.csproj b/test/Riok.Mapperly.Tests/Riok.Mapperly.Tests.csproj index 57db2b5e0e..f2c6ccb4f0 100644 --- a/test/Riok.Mapperly.Tests/Riok.Mapperly.Tests.csproj +++ b/test/Riok.Mapperly.Tests/Riok.Mapperly.Tests.csproj @@ -2,7 +2,7 @@ - + diff --git a/test/Riok.Mapperly.Tests/_snapshots/DerivedTypeTest.WithInterfaceSourceNullableShouldWork.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/DerivedTypeTest.WithInterfaceSourceNullableShouldWork.verified.txt new file mode 100644 index 0000000000..607ed1ebf9 --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/DerivedTypeTest.WithInterfaceSourceNullableShouldWork.verified.txt @@ -0,0 +1,28 @@ +{ + Diagnostics: [ + { + Location: /* +{ + [MapDerivedType] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +[MapDerivedType] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +public partial B Map(A? src); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(13,29), + Message: Mapping the nullable source of type A? to target of type B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG090, + Title: Mapping nullable source type to non-nullable target type, + MessageFormat: Mapping the nullable source of type {0} to target of type {1} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/DictionaryCustomTest.DictionaryToCustomDictionaryWithPrivateCtorShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/DictionaryCustomTest.DictionaryToCustomDictionaryWithPrivateCtorShouldDiagnostic.verified.txt index 4cc99f1d01..9b59af6f5e 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/DictionaryCustomTest.DictionaryToCustomDictionaryWithPrivateCtorShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/DictionaryCustomTest.DictionaryToCustomDictionaryWithPrivateCtorShouldDiagnostic.verified.txt @@ -1,14 +1,23 @@ { Diagnostics: [ { - Id: RMG013, - Title: No accessible constructor with mappable arguments found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,59), - MessageFormat: {0} has no accessible constructor with mappable arguments, + Location: /* +{ + private partial A Map(IDictionary source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,59), Message: A has no accessible constructor with mappable arguments, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG013, + Title: No accessible constructor with mappable arguments found, + MessageFormat: {0} has no accessible constructor with mappable arguments, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=SourceLowerMissingSource.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=SourceLowerMissingSource.verified.txt index edfc865ddb..dfb8394693 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=SourceLowerMissingSource.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=SourceLowerMissingSource.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value3 (1) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member Value3 (1) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingMultipleSource.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingMultipleSource.verified.txt index 5ff2ed9020..0aaf6014fe 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingMultipleSource.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingMultipleSource.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member value5 (0) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member value5 (0) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member value7 (2) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member value7 (2) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingMultipleTarget.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingMultipleTarget.verified.txt index 6bd08a8331..bf6e8a9b01 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingMultipleTarget.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingMultipleTarget.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value5 (0) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value5 (0) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value7 (2) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value7 (2) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingTarget.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingTarget.verified.txt index 11aa939768..b27d301116 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingTarget.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByNameCaseInsensitive_testCase=TargetLowerMissingTarget.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value5 (1) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value5 (1) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingMultipleSource.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingMultipleSource.verified.txt index e6fb6d62e7..3cc706c584 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingMultipleSource.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingMultipleSource.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value2 (1) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member Value2 (1) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value3 (2) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member Value3 (2) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingMultipleTarget.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingMultipleTarget.verified.txt index fc390fbac5..769edea01c 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingMultipleTarget.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingMultipleTarget.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value2 (1) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value2 (1) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value3 (2) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value3 (2) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingSource.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingSource.verified.txt index 9ddeabbbda..7bd43d2719 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingSource.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingSource.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value2 (1) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member Value2 (1) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingTarget.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingTarget.verified.txt index a374defe2b..c028cb95bd 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingTarget.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByNameMissingTarget.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value2 (1) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value2 (1) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingMultipleSource.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingMultipleSource.verified.txt index e6fb6d62e7..3cc706c584 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingMultipleSource.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingMultipleSource.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value2 (1) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member Value2 (1) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value3 (2) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member Value3 (2) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingMultipleTarget.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingMultipleTarget.verified.txt index fc390fbac5..769edea01c 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingMultipleTarget.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingMultipleTarget.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value2 (1) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value2 (1) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value3 (2) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value3 (2) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingSource.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingSource.verified.txt index 9ddeabbbda..7bd43d2719 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingSource.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingSource.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value2 (1) on D not found on source enum C, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member Value2 (1) on D not found on source enum C, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingTarget.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingTarget.verified.txt index a374defe2b..c028cb95bd 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingTarget.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToAnotherEnumByStrategyMissingValues_testCase=ByValueMissingTarget.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Enum member Value2 (1) on C not found on target enum D, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member Value2 (1) on C not found on target enum D, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToOtherEnumByNameWithoutOverlap.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToOtherEnumByNameWithoutOverlap.verified.txt index 2e5ec9a495..636c93d553 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToOtherEnumByNameWithoutOverlap.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumTest.EnumToOtherEnumByNameWithoutOverlap.verified.txt @@ -1,74 +1,144 @@ { Diagnostics: [ { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + [MapEnum(EnumMappingStrategy.ByName)] private partial E2 ToE1(E1 source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,77), + Message: Enum member A (0) on E1 not found on target enum E2, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,77), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member A (0) on E1 not found on target enum E2, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + [MapEnum(EnumMappingStrategy.ByName)] private partial E2 ToE1(E1 source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,77), + Message: Enum member B (1) on E1 not found on target enum E2, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,77), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member B (1) on E1 not found on target enum E2, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG038, - Title: An enum member could not be found on the target enum, + Location: /* +{ + [MapEnum(EnumMappingStrategy.ByName)] private partial E2 ToE1(E1 source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,77), + Message: Enum member C (2) on E1 not found on target enum E2, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,77), - MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, - Message: Enum member C (2) on E1 not found on target enum E2, - Category: Mapper + Descriptor: { + Id: RMG038, + Title: An enum member could not be found on the target enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on target enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + [MapEnum(EnumMappingStrategy.ByName)] private partial E2 ToE1(E1 source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,77), + Message: Enum member D (0) on E2 not found on source enum E1, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,77), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member D (0) on E2 not found on source enum E1, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + [MapEnum(EnumMappingStrategy.ByName)] private partial E2 ToE1(E1 source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,77), + Message: Enum member E (1) on E2 not found on source enum E1, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,77), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member E (1) on E2 not found on source enum E1, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG037, - Title: An enum member could not be found on the source enum, + Location: /* +{ + [MapEnum(EnumMappingStrategy.ByName)] private partial E2 ToE1(E1 source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,77), + Message: Enum member F (2) on E2 not found on source enum E1, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,77), - MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, - Message: Enum member F (2) on E2 not found on source enum E1, - Category: Mapper + Descriptor: { + Id: RMG037, + Title: An enum member could not be found on the source enum, + MessageFormat: Enum member {0} ({1}) on {2} not found on source enum {3}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG003, - Title: No overlapping enum members found, + Location: /* +{ + [MapEnum(EnumMappingStrategy.ByName)] private partial E2 ToE1(E1 source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,77), + Message: E1 and E2 don't have overlapping enum member names, mapping will therefore always result in an exception, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,77), - MessageFormat: {0} and {1} don't have overlapping enum member names, mapping will therefore always result in an exception, - Message: E1 and E2 don't have overlapping enum member names, mapping will therefore always result in an exception, - Category: Mapper + Descriptor: { + Id: RMG003, + Title: No overlapping enum members found, + MessageFormat: {0} and {1} don't have overlapping enum member names, mapping will therefore always result in an exception, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumerableExistingTargetTest.MapArrayToReadOnlyArrayShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumerableExistingTargetTest.MapArrayToReadOnlyArrayShouldDiagnostic.verified.txt index c31a53ff6e..6bb5551cd3 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumerableExistingTargetTest.MapArrayToReadOnlyArrayShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumerableExistingTargetTest.MapArrayToReadOnlyArrayShouldDiagnostic.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG083, - Title: Cannot map to read only type, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Cannot map to read-only type int[], Severity: Info, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Cannot map to read-only type {0}, - Message: Cannot map to read-only type int[], - Category: Mapper + Descriptor: { + Id: RMG083, + Title: Cannot map to read only type, + MessageFormat: Cannot map to read-only type {0}, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumerableTest.MapToReadOnlyCollectionPropertyFromNullable.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumerableTest.MapToReadOnlyCollectionPropertyFromNullable.verified.txt new file mode 100644 index 0000000000..cc0cf622c9 --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumerableTest.MapToReadOnlyCollectionPropertyFromNullable.verified.txt @@ -0,0 +1,24 @@ +{ + Diagnostics: [ + { + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Mapping the nullable source of type System.Collections.Generic.ICollection? to target of type System.Collections.Generic.ICollection which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG090, + Title: Mapping nullable source type to non-nullable target type, + MessageFormat: Mapping the nullable source of type {0} to target of type {1} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/EnumerableTest.NullableElementMappingWithPrivateConstructorShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/EnumerableTest.NullableElementMappingWithPrivateConstructorShouldDiagnostic.verified.txt index 7bb58b40bf..8208726fed 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/EnumerableTest.NullableElementMappingWithPrivateConstructorShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/EnumerableTest.NullableElementMappingWithPrivateConstructorShouldDiagnostic.verified.txt @@ -1,14 +1,23 @@ { Diagnostics: [ { - Id: RMG013, - Title: No accessible constructor with mappable arguments found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,36), - MessageFormat: {0} has no accessible constructor with mappable arguments, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), Message: C has no accessible constructor with mappable arguments, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG013, + Title: No accessible constructor with mappable arguments found, + MessageFormat: {0} has no accessible constructor with mappable arguments, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithGenericSourceAndTargetAndUnboundGenericShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithGenericSourceAndTargetAndUnboundGenericShouldDiagnostic.verified.txt index 8f014fbe6f..040d748dec 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithGenericSourceAndTargetAndUnboundGenericShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithGenericSourceAndTargetAndUnboundGenericShouldDiagnostic.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG069, - Title: Runtime target type or generic type mapping does not match any mappings, + Location: /* +{ + private partial TTarget Map(TSource source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*/ + : (11,4)-(11,76), + Message: Runtime target type or generic type mapping does not match any mappings, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,76), - MessageFormat: Runtime target type or generic type mapping does not match any mappings, - Message: Runtime target type or generic type mapping does not match any mappings, - Category: Mapper + Descriptor: { + Id: RMG069, + Title: Runtime target type or generic type mapping does not match any mappings, + MessageFormat: Runtime target type or generic type mapping does not match any mappings, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/NullableTest.NullableToNonNullableWithNoThrowNoAccessibleCtorShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/NullableTest.NullableToNonNullableWithNoThrowNoAccessibleCtorShouldDiagnostic.verified.txt index 8ab27f127d..b278b22d5d 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/NullableTest.NullableToNonNullableWithNoThrowNoAccessibleCtorShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/NullableTest.NullableToNonNullableWithNoThrowNoAccessibleCtorShouldDiagnostic.verified.txt @@ -1,14 +1,43 @@ { Diagnostics: [ { - Id: RMG002, - Title: No accessible parameterless constructor found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,42), - MessageFormat: {0} has no accessible parameterless constructor, + Location: /* +{ + private partial B Map(string? source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,42), + Message: Mapping the nullable source of type string? to target of type B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG090, + Title: Mapping nullable source type to non-nullable target type, + MessageFormat: Mapping the nullable source of type {0} to target of type {1} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + }, + { + Location: /* +{ + private partial B Map(string? source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,42), Message: B has no accessible parameterless constructor, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG002, + Title: No accessible parameterless constructor found, + MessageFormat: {0} has no accessible parameterless constructor, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectNestedPropertyTest.InvalidNestedPropertiesPathShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectNestedPropertyTest.InvalidNestedPropertiesPathShouldDiagnostic.verified.txt index 4b254245f7..c36b19fcd4 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectNestedPropertyTest.InvalidNestedPropertiesPathShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectNestedPropertyTest.InvalidNestedPropertiesPathShouldDiagnostic.verified.txt @@ -1,14 +1,23 @@ { Diagnostics: [ { - Id: RMG070, - Title: Mapping nested member not found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,59), - MessageFormat: Specified nested member {0} on source type {1} was not found, + Location: /* +{ + [MapNestedProperties("Value")] partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,59), Message: Specified nested member Value on source type A was not found, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG070, + Title: Mapping nested member not found, + MessageFormat: Specified nested member {0} on source type {1} was not found, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectNestedPropertyTest.UnusedNestedPropertiesShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectNestedPropertyTest.UnusedNestedPropertiesShouldDiagnostic.verified.txt index a9f962dea8..6616f7b026 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectNestedPropertyTest.UnusedNestedPropertiesShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectNestedPropertyTest.UnusedNestedPropertiesShouldDiagnostic.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapNestedProperties(nameof(A.Value))] partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,67), + Message: The member Value on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,67), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member Value on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG071, - Title: Nested properties mapping is not used, + Location: /* +{ + [MapNestedProperties(nameof(A.Value))] partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,67), + Message: Configured nested member Value on source type A is not used, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,67), - MessageFormat: Configured nested member {0} on source type {1} is not used, - Message: Configured nested member Value on source type A is not used, - Category: Mapper + Descriptor: { + Id: RMG071, + Title: Nested properties mapping is not used, + MessageFormat: Configured nested member {0} on source type {1} is not used, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassPrivateCtorShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassPrivateCtorShouldDiagnostic.verified.txt index 9f2412c70c..4b0459d2b8 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassPrivateCtorShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassPrivateCtorShouldDiagnostic.verified.txt @@ -1,14 +1,23 @@ { Diagnostics: [ { - Id: RMG013, - Title: No accessible constructor with mappable arguments found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,36), - MessageFormat: {0} has no accessible constructor with mappable arguments, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), Message: B has no accessible constructor with mappable arguments, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG013, + Title: No accessible constructor with mappable arguments found, + MessageFormat: {0} has no accessible constructor with mappable arguments, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassUnmatchedAttributedCtorShouldDiagnosticAndUseAlternative.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassUnmatchedAttributedCtorShouldDiagnosticAndUseAlternative.verified.txt index 1e95a4500b..9661c93b31 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassUnmatchedAttributedCtorShouldDiagnosticAndUseAlternative.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassUnmatchedAttributedCtorShouldDiagnosticAndUseAlternative.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG014, - Title: Cannot map to the configured constructor to be used by Mapperly, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Cannot map from A to the configured constructor B.B(string), Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Cannot map from {0} to the configured constructor {1}, - Message: Cannot map from A to the configured constructor B.B(string), - Category: Mapper + Descriptor: { + Id: RMG014, + Title: Cannot map to the configured constructor to be used by Mapperly, + MessageFormat: Cannot map from {0} to the configured constructor {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassUnmatchedCtorShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassUnmatchedCtorShouldDiagnostic.verified.txt index 2e323841ef..0d37939ec2 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassUnmatchedCtorShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassUnmatchedCtorShouldDiagnostic.verified.txt @@ -1,24 +1,43 @@ { Diagnostics: [ { - Id: RMG013, - Title: No accessible constructor with mappable arguments found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,36), - MessageFormat: {0} has no accessible constructor with mappable arguments, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), Message: B has no accessible constructor with mappable arguments, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG013, + Title: No accessible constructor with mappable arguments found, + MessageFormat: {0} has no accessible constructor with mappable arguments, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassWithOneMatchingCtorAndUnmatchedSourcePropertyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassWithOneMatchingCtorAndUnmatchedSourcePropertyShouldDiagnostic.verified.txt index 5b6c80d54a..d31fed6ca0 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassWithOneMatchingCtorAndUnmatchedSourcePropertyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyConstructorResolverTest.ClassToClassWithOneMatchingCtorAndUnmatchedSourcePropertyShouldDiagnostic.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member IntValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member IntValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyExistingInstanceTest.UnmappedRequiredPropertyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyExistingInstanceTest.UnmappedRequiredPropertyShouldDiagnostic.verified.txt index 72e26bde98..802003a671 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyExistingInstanceTest.UnmappedRequiredPropertyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyExistingInstanceTest.UnmappedRequiredPropertyShouldDiagnostic.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + public partial void Update(A source, B target); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,51), + Message: The member Value on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,51), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member Value on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + public partial void Update(A source, B target); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,51), + Message: The member Value2 on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,51), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Value2 on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyNullablePathNoParameterlessCtorShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyNullablePathNoParameterlessCtorShouldDiagnostic.verified.txt index f2556c605e..6d46f4158c 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyNullablePathNoParameterlessCtorShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyNullablePathNoParameterlessCtorShouldDiagnostic.verified.txt @@ -1,14 +1,23 @@ { Diagnostics: [ { - Id: RMG002, - Title: No accessible parameterless constructor found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,75), - MessageFormat: {0} has no accessible parameterless constructor, + Location: /* +{ + [MapProperty("MyValueId", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,75), Message: C has no accessible parameterless constructor, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG002, + Title: No accessible parameterless constructor found, + MessageFormat: {0} has no accessible parameterless constructor, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertySourcePropertyNotFoundShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertySourcePropertyNotFoundShouldDiagnostic.verified.txt index 1a2d3a9fbb..1d64212c94 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertySourcePropertyNotFoundShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertySourcePropertyNotFoundShouldDiagnostic.verified.txt @@ -1,45 +1,84 @@ { Diagnostics: [ { - Id: RMG006, - Title: Mapping source member not found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,78), - MessageFormat: Specified member {0} on source type {1} was not found, + Location: /* +{ + [MapProperty("MyValueIdXXX", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,78), Message: Specified member MyValueIdXXX on source type A was not found, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG006, + Title: Mapping source member not found, + MessageFormat: Specified member {0} on source type {1} was not found, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapProperty("MyValueIdXXX", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,78), + Message: The member MyValueId on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,78), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member MyValueId on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + [MapProperty("MyValueIdXXX", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,78), + Message: The member Value on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,78), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Value on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG066, - Title: No members are mapped in an object mapping, + Location: /* +{ + [MapProperty("MyValueIdXXX", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,78), + Message: No members are mapped in the object mapping from A to B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,78), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, - MessageFormat: No members are mapped in the object mapping from {0} to {1}, - Message: No members are mapped in the object mapping from A to B, - Category: Mapper + Descriptor: { + Id: RMG066, + Title: No members are mapped in an object mapping, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, + MessageFormat: No members are mapped in the object mapping from {0} to {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyTargetPropertyNotFoundShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyTargetPropertyNotFoundShouldDiagnostic.verified.txt index 000e1e3265..e2673c790e 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyTargetPropertyNotFoundShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyTargetPropertyNotFoundShouldDiagnostic.verified.txt @@ -1,45 +1,84 @@ { Diagnostics: [ { - Id: RMG005, - Title: Mapping target member not found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,78), - MessageFormat: Specified member {0} on mapping target type {1} was not found, + Location: /* +{ + [MapProperty("MyValueId", "Value.IdXXX")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,78), Message: Specified member Value.IdXXX on mapping target type B was not found, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG005, + Title: Mapping target member not found, + MessageFormat: Specified member {0} on mapping target type {1} was not found, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapProperty("MyValueId", "Value.IdXXX")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,78), + Message: The member MyValueId on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,78), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member MyValueId on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + [MapProperty("MyValueId", "Value.IdXXX")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,78), + Message: The member Value on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,78), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Value on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG066, - Title: No members are mapped in an object mapping, + Location: /* +{ + [MapProperty("MyValueId", "Value.IdXXX")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,78), + Message: No members are mapped in the object mapping from A to B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,78), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, - MessageFormat: No members are mapped in the object mapping from {0} to {1}, - Message: No members are mapped in the object mapping from A to B, - Category: Mapper + Descriptor: { + Id: RMG066, + Title: No members are mapped in an object mapping, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, + MessageFormat: No members are mapped in the object mapping from {0} to {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyTargetPropertyPathWriteOnlyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyTargetPropertyPathWriteOnlyShouldDiagnostic.verified.txt index d4c7a8f2c2..16e1ee9a50 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyTargetPropertyPathWriteOnlyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyFlatteningTest.ManualUnflattenedPropertyTargetPropertyPathWriteOnlyShouldDiagnostic.verified.txt @@ -1,45 +1,85 @@ { Diagnostics: [ { - Id: RMG011, - Title: Cannot map to write only member path, + Location: /* +{ + [MapProperty($"MyValueId", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,76), + Message: Cannot map from A.MyValueId to write only member path B.Value.Id of type string, Severity: Info, WarningLevel: 1, - Location: : (11,4)-(11,76), - MessageFormat: Cannot map from {0} to write only member path {1}, - Message: Cannot map from A.MyValueId to write only member path B.Value.Id of type string, - Category: Mapper + Descriptor: { + Id: RMG011, + Title: Cannot map to write only member path, + MessageFormat: Cannot map from {0} to write only member path {1}, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapProperty($"MyValueId", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,76), + Message: The member MyValueId on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,76), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member MyValueId on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + [MapProperty($"MyValueId", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,76), + Message: The member Value on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,76), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Value on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG066, - Title: No members are mapped in an object mapping, + Location: /* +{ + [MapProperty($"MyValueId", "Value.Id")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,76), + Message: No members are mapped in the object mapping from A to B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,76), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, - MessageFormat: No members are mapped in the object mapping from {0} to {1}, - Message: No members are mapped in the object mapping from A to B, - Category: Mapper + Descriptor: { + Id: RMG066, + Title: No members are mapped in an object mapping, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, + MessageFormat: No members are mapped in the object mapping from {0} to {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithConfigurationNotFoundSourcePropertyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithConfigurationNotFoundSourcePropertyShouldDiagnostic.verified.txt index beef16c901..6d085e8691 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithConfigurationNotFoundSourcePropertyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithConfigurationNotFoundSourcePropertyShouldDiagnostic.verified.txt @@ -1,14 +1,23 @@ { Diagnostics: [ { - Id: RMG006, - Title: Mapping source member not found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,81), - MessageFormat: Specified member {0} on source type {1} was not found, + Location: /* +{ + [MapProperty("StringValue2", "StringValue")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,81), Message: Specified member StringValue2 on source type A was not found, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG006, + Title: Mapping source member not found, + MessageFormat: Specified member {0} on source type {1} was not found, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithMultipleConfigurationsShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithMultipleConfigurationsShouldDiagnostic.verified.txt index a5c457ebbe..de8b172425 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithMultipleConfigurationsShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithMultipleConfigurationsShouldDiagnostic.verified.txt @@ -1,24 +1,43 @@ { Diagnostics: [ { - Id: RMG074, - Title: Multiple mappings are configured for the same target member, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,126), - MessageFormat: Multiple mappings are configured for the same target member {0}.{1}, + Location: /* +{ + [MapProperty("StringValue2", "StringValue")] [MapProperty("StringValue3", "StringValue")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,126), Message: Multiple mappings are configured for the same target member B.StringValue, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG074, + Title: Multiple mappings are configured for the same target member, + MessageFormat: Multiple mappings are configured for the same target member {0}.{1}, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapProperty("StringValue2", "StringValue")] [MapProperty("StringValue3", "StringValue")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,126), + Message: The member StringValue3 on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,126), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue3 on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithPathConfigurationsShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithPathConfigurationsShouldDiagnostic.verified.txt index 5594ea3771..421c31dfcf 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithPathConfigurationsShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.InitOnlyPropertyWithPathConfigurationsShouldDiagnostic.verified.txt @@ -1,45 +1,84 @@ { Diagnostics: [ { - Id: RMG016, - Title: Init only member cannot handle target paths, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,81), - MessageFormat: Cannot map to init only member path {0}.{1}, + Location: /* +{ + [MapProperty("NestedValue", "Nested.Value")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,81), Message: Cannot map to init only member path B.Nested.Value, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG016, + Title: Init only member cannot handle target paths, + MessageFormat: Cannot map to init only member path {0}.{1}, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + [MapProperty("NestedValue", "Nested.Value")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,81), + Message: The member Nested on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,81), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Nested on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapProperty("NestedValue", "Nested.Value")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,81), + Message: The member NestedValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,81), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member NestedValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG066, - Title: No members are mapped in an object mapping, + Location: /* +{ + [MapProperty("NestedValue", "Nested.Value")] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,81), + Message: No members are mapped in the object mapping from A to B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,81), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, - MessageFormat: No members are mapped in the object mapping from {0} to {1}, - Message: No members are mapped in the object mapping from A to B, - Category: Mapper + Descriptor: { + Id: RMG066, + Title: No members are mapped in an object mapping, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, + MessageFormat: No members are mapped in the object mapping from {0} to {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.RequiredPropertySourceNotFoundShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.RequiredPropertySourceNotFoundShouldDiagnostic.verified.txt index 5ce54e6aae..0ba246d54f 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.RequiredPropertySourceNotFoundShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyInitPropertyTest.RequiredPropertySourceNotFoundShouldDiagnostic.verified.txt @@ -1,24 +1,43 @@ { Diagnostics: [ { - Id: RMG023, - Title: Source member was not found for required target member, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,36), - MessageFormat: Required member {0} on mapping target type {1} was not found on the mapping source type {2}, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), Message: Required member StringValue on mapping target type B was not found on the mapping source type A, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG023, + Title: Source member was not found for required target member, + MessageFormat: Required member {0} on mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValue2 on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue2 on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyNullableTest.NullableIntWithAdditionalFlattenedValueToNonNullableIntProperties.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyNullableTest.NullableIntWithAdditionalFlattenedValueToNonNullableIntProperties.verified.txt index 04a17fd708..c16b862060 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyNullableTest.NullableIntWithAdditionalFlattenedValueToNonNullableIntProperties.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyNullableTest.NullableIntWithAdditionalFlattenedValueToNonNullableIntProperties.verified.txt @@ -1,14 +1,84 @@ { Diagnostics: [ { - Id: RMG020, - Title: Source member is not mapped to any target member, - Severity: Warning, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Mapping the nullable source property Nested of A to the target property Nested of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + }, + { + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Mapping the nullable source property Nested.Value2 of A to the target property NestedValue2 of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + }, + { + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Mapping the nullable source property Value1 of C to the target property Value1 of D which is not nullable, + Severity: Info, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + }, + { + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), Message: The member Value2 on the mapping source type C is not mapped to any member on the mapping target type D, - Category: Mapper + Severity: Warning, + WarningLevel: 1, + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyNullableTest.NullableToNullablePropertyWithAnotherNullableToNonNullableMappingShouldDirectAssign.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyNullableTest.NullableToNullablePropertyWithAnotherNullableToNonNullableMappingShouldDirectAssign.verified.txt new file mode 100644 index 0000000000..f219cd7291 --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyNullableTest.NullableToNullablePropertyWithAnotherNullableToNonNullableMappingShouldDirectAssign.verified.txt @@ -0,0 +1,24 @@ +{ + Diagnostics: [ + { + Location: /* + public static partial ADest? Map(A? source); +public static partial BDest MapToDestinationB(B source); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (12,0)-(12,56), + Message: Mapping the nullable source of type int? to target of type int which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG090, + Title: Mapping nullable source type to non-nullable target type, + MessageFormat: Mapping the nullable source of type {0} to target of type {1} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.PropertiesWithCaseInsensitiveEqualNamesShouldWork.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.PropertiesWithCaseInsensitiveEqualNamesShouldWork.verified.txt index c60321795e..3c1e3ebbc1 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.PropertiesWithCaseInsensitiveEqualNamesShouldWork.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.PropertiesWithCaseInsensitiveEqualNamesShouldWork.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member value on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member value on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.ShouldIgnoreWriteOnlyPropertyOnSourceWithDiagnostics.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.ShouldIgnoreWriteOnlyPropertyOnSourceWithDiagnostics.verified.txt index 4c6174ba56..611f4098ae 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.ShouldIgnoreWriteOnlyPropertyOnSourceWithDiagnostics.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.ShouldIgnoreWriteOnlyPropertyOnSourceWithDiagnostics.verified.txt @@ -1,34 +1,64 @@ { Diagnostics: [ { - Id: RMG010, - Title: Cannot map from write only member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Cannot map from write only member A.StringValue2 of type string to member B.StringValue2 of type string, Severity: Info, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Cannot map from write only member {0} to member {1}, - Message: Cannot map from write only member A.StringValue2 of type string to member B.StringValue2 of type string, - Category: Mapper + Descriptor: { + Id: RMG010, + Title: Cannot map from write only member, + MessageFormat: Cannot map from write only member {0} to member {1}, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValue2 on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue2 on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValue2 on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member StringValue2 on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualMappedNotFoundSourcePropertyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualMappedNotFoundSourcePropertyShouldDiagnostic.verified.txt index c252ee2f3c..75cc14536a 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualMappedNotFoundSourcePropertyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualMappedNotFoundSourcePropertyShouldDiagnostic.verified.txt @@ -1,45 +1,84 @@ { Diagnostics: [ { - Id: RMG006, - Title: Mapping source member not found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,89), - MessageFormat: Specified member {0} on source type {1} was not found, + Location: /* +{ + [MapProperty("StringValue9", nameof(B.StringValue2)] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,89), Message: Specified member StringValue9 on source type A was not found, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG006, + Title: Mapping source member not found, + MessageFormat: Specified member {0} on source type {1} was not found, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapProperty("StringValue9", nameof(B.StringValue2)] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,89), + Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,89), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + [MapProperty("StringValue9", nameof(B.StringValue2)] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,89), + Message: The member StringValue2 on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,89), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member StringValue2 on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG066, - Title: No members are mapped in an object mapping, + Location: /* +{ + [MapProperty("StringValue9", nameof(B.StringValue2)] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,89), + Message: No members are mapped in the object mapping from A to B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,89), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, - MessageFormat: No members are mapped in the object mapping from {0} to {1}, - Message: No members are mapped in the object mapping from A to B, - Category: Mapper + Descriptor: { + Id: RMG066, + Title: No members are mapped in an object mapping, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, + MessageFormat: No members are mapped in the object mapping from {0} to {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualMappedNotFoundTargetPropertyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualMappedNotFoundTargetPropertyShouldDiagnostic.verified.txt index c92eaf4656..37d0b347d0 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualMappedNotFoundTargetPropertyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualMappedNotFoundTargetPropertyShouldDiagnostic.verified.txt @@ -1,45 +1,84 @@ { Diagnostics: [ { - Id: RMG005, - Title: Mapping target member not found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,96), - MessageFormat: Specified member {0} on mapping target type {1} was not found, + Location: /* +{ + [MapProperty(nameof(A.StringValue), nameof(B.StringValue9)] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,96), Message: Specified member StringValue9 on mapping target type B was not found, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG005, + Title: Mapping target member not found, + MessageFormat: Specified member {0} on mapping target type {1} was not found, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapProperty(nameof(A.StringValue), nameof(B.StringValue9)] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,96), + Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,96), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + [MapProperty(nameof(A.StringValue), nameof(B.StringValue9)] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,96), + Message: The member StringValue2 on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,96), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member StringValue2 on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG066, - Title: No members are mapped in an object mapping, + Location: /* +{ + [MapProperty(nameof(A.StringValue), nameof(B.StringValue9)] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,96), + Message: No members are mapped in the object mapping from A to B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,96), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, - MessageFormat: No members are mapped in the object mapping from {0} to {1}, - Message: No members are mapped in the object mapping from A to B, - Category: Mapper + Descriptor: { + Id: RMG066, + Title: No members are mapped in an object mapping, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, + MessageFormat: No members are mapped in the object mapping from {0} to {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualNotFoundSourcePropertyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualNotFoundSourcePropertyShouldDiagnostic.verified.txt index 030cedf843..e1a4f5551f 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualNotFoundSourcePropertyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithManualNotFoundSourcePropertyShouldDiagnostic.verified.txt @@ -1,45 +1,84 @@ { Diagnostics: [ { - Id: RMG006, - Title: Mapping source member not found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,87), - MessageFormat: Specified member {0} on source type {1} was not found, + Location: /* +{ + [MapProperty("not_found", nameof(B.StringValue2))] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,87), Message: Specified member not_found on source type A was not found, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG006, + Title: Mapping source member not found, + MessageFormat: Specified member {0} on source type {1} was not found, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + [MapProperty("not_found", nameof(B.StringValue2))] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,87), + Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,87), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + [MapProperty("not_found", nameof(B.StringValue2))] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,87), + Message: The member StringValue2 on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,87), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member StringValue2 on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG066, - Title: No members are mapped in an object mapping, + Location: /* +{ + [MapProperty("not_found", nameof(B.StringValue2))] private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,87), + Message: No members are mapped in the object mapping from A to B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,87), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, - MessageFormat: No members are mapped in the object mapping from {0} to {1}, - Message: No members are mapped in the object mapping from A to B, - Category: Mapper + Descriptor: { + Id: RMG066, + Title: No members are mapped in an object mapping, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, + MessageFormat: No members are mapped in the object mapping from {0} to {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPrivateSourceGetterShouldIgnoreAndDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPrivateSourceGetterShouldIgnoreAndDiagnostic.verified.txt index c077ccac5e..a6ffa97e83 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPrivateSourceGetterShouldIgnoreAndDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPrivateSourceGetterShouldIgnoreAndDiagnostic.verified.txt @@ -1,34 +1,64 @@ { Diagnostics: [ { - Id: RMG010, - Title: Cannot map from write only member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Cannot map from write only member A.StringValue of type string to member B.StringValue of type string, Severity: Info, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Cannot map from write only member {0} to member {1}, - Message: Cannot map from write only member A.StringValue of type string to member B.StringValue of type string, - Category: Mapper + Descriptor: { + Id: RMG010, + Title: Cannot map from write only member, + MessageFormat: Cannot map from write only member {0} to member {1}, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValue on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member StringValue on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPrivateSourcePathGetterShouldIgnoreAndDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPrivateSourcePathGetterShouldIgnoreAndDiagnostic.verified.txt index dfa97e1103..ea50b29ab5 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPrivateSourcePathGetterShouldIgnoreAndDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPrivateSourcePathGetterShouldIgnoreAndDiagnostic.verified.txt @@ -1,34 +1,64 @@ { Diagnostics: [ { - Id: RMG010, - Title: Cannot map from write only member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: Cannot map from write only member A.NestedValue of type C to member B.NestedValue of type D, Severity: Info, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: Cannot map from write only member {0} to member {1}, - Message: Cannot map from write only member A.NestedValue of type C to member B.NestedValue of type D, - Category: Mapper + Descriptor: { + Id: RMG010, + Title: Cannot map from write only member, + MessageFormat: Cannot map from write only member {0} to member {1}, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member NestedValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member NestedValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member NestedValue on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member NestedValue on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPropertyNameMappingStrategyCaseSensitive.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPropertyNameMappingStrategyCaseSensitive.verified.txt index 4d7e4d9c1f..1cdaf2ee3f 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPropertyNameMappingStrategyCaseSensitive.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithPropertyNameMappingStrategyCaseSensitive.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValue on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member stringvalue on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member stringvalue on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithUnmappablePropertyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithUnmappablePropertyShouldDiagnostic.verified.txt index 0aa57b2164..eedbb54799 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithUnmappablePropertyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithUnmappablePropertyShouldDiagnostic.verified.txt @@ -1,45 +1,84 @@ { Diagnostics: [ { - Id: RMG007, - Title: Could not map member, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,36), - MessageFormat: Could not map member {0} to {1}, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), Message: Could not map member A.Value of type System.Version to B.Value of type System.DateTime, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG007, + Title: Could not map member, + MessageFormat: Could not map member {0} to {1}, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member Value on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member Value on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member Value on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Value on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG066, - Title: No members are mapped in an object mapping, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: No members are mapped in the object mapping from A to B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, - MessageFormat: No members are mapped in the object mapping from {0} to {1}, - Message: No members are mapped in the object mapping from A to B, - Category: Mapper + Descriptor: { + Id: RMG066, + Title: No members are mapped in an object mapping, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG066, + MessageFormat: No members are mapped in the object mapping from {0} to {1}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithUnmatchedPropertyShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithUnmatchedPropertyShouldDiagnostic.verified.txt index 3f44eac40c..49aac48718 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithUnmatchedPropertyShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyTest.WithUnmatchedPropertyShouldDiagnostic.verified.txt @@ -1,24 +1,44 @@ { Diagnostics: [ { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValueA on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member StringValueA on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + private partial B Map(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,36), + Message: The member StringValueB on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,36), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member StringValueB on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyUseNamedMappingTest.ShouldPassNullValueToNullableUserMappingMethod.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyUseNamedMappingTest.ShouldPassNullValueToNullableUserMappingMethod.verified.txt new file mode 100644 index 0000000000..08854d0d07 --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyUseNamedMappingTest.ShouldPassNullValueToNullableUserMappingMethod.verified.txt @@ -0,0 +1,26 @@ +{ + Diagnostics: [ + { + Location: /* +{ + [MapProperty(nameof(A.Value), nameof(B.Value), Use = nameof(MapString)] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +public partial B Map(A source); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*/ + : (11,4)-(12,31), + Message: Mapping the nullable source property Value2 of A to the target property Value2 of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyUseNamedMappingTest.UserMethodReturnsNullableShouldThrow.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyUseNamedMappingTest.UserMethodReturnsNullableShouldThrow.verified.txt new file mode 100644 index 0000000000..a8577c4ae1 --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/ObjectPropertyUseNamedMappingTest.UserMethodReturnsNullableShouldThrow.verified.txt @@ -0,0 +1,44 @@ +{ + Diagnostics: [ + { + Location: /* +{ + [MapProperty("Name", "Value", Use = nameof(ToC))] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +public partial B Map(A source); +*/ + : (11,5)-(11,52), + Message: Mapping the nullable source of type string? to target of type string which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG090, + Title: Mapping nullable source type to non-nullable target type, + MessageFormat: Mapping the nullable source of type {0} to target of type {1} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + }, + { + Location: /* +{ + [MapProperty("Name", "Value", Use = nameof(ToC))] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +public partial B Map(A source); +*/ + : (11,5)-(11,52), + Message: Mapping the nullable source of type C? to target of type C which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG090, + Title: Mapping nullable source type to non-nullable target type, + MessageFormat: Mapping the nullable source of type {0} to target of type {1} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlatten.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlatten.verified.txt new file mode 100644 index 0000000000..43040543aa --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlatten.verified.txt @@ -0,0 +1,24 @@ +{ + Diagnostics: [ + { + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), + Message: Mapping the nullable source property Nested.Value of A to the target property NestedValue of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlattenString.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlattenString.verified.txt new file mode 100644 index 0000000000..43040543aa --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlattenString.verified.txt @@ -0,0 +1,24 @@ +{ + Diagnostics: [ + { + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), + Message: Mapping the nullable source property Nested.Value of A to the target property NestedValue of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathManuallyFlatten.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathManuallyFlatten.verified.txt new file mode 100644 index 0000000000..e33eb2daf4 --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathManuallyFlatten.verified.txt @@ -0,0 +1,44 @@ +{ + Diagnostics: [ + { + Location: /* + public partial System.Linq.IQueryable Map(System.Linq.IQueryable q); +[MapProperty("Nested.Nested2.Value3", "NestedValue4")] private partial B Map(A source); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (12,0)-(12,87), + Message: Mapping the nullable source property Nested.Nested2.Value3 of A to the target property NestedValue4 of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + }, + { + Location: /* + public partial System.Linq.IQueryable Map(System.Linq.IQueryable q); +[MapProperty("Nested.Nested2.Value3", "NestedValue4")] private partial B Map(A source); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (12,0)-(12,87), + Message: Mapping the nullable source property Nested.Nested2.Value3 of A to the target property NestedValue4 of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceProperty.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceProperty.verified.txt new file mode 100644 index 0000000000..bc724deb70 --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceProperty.verified.txt @@ -0,0 +1,24 @@ +{ + Diagnostics: [ + { + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), + Message: Mapping the nullable source property StringValue of A to the target property StringValue of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceValueTypeProperty.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceValueTypeProperty.verified.txt new file mode 100644 index 0000000000..172088d117 --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceValueTypeProperty.verified.txt @@ -0,0 +1,24 @@ +{ + Diagnostics: [ + { + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), + Message: Mapping the nullable source property IntValue of A to the target property IntValue of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorWithPathMappingShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorWithPathMappingShouldDiagnostic.verified.txt index 083fa08877..9122fa95ac 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorWithPathMappingShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorWithPathMappingShouldDiagnostic.verified.txt @@ -1,14 +1,25 @@ { Diagnostics: [ { - Id: RMG005, - Title: Mapping target member not found, - Severity: Error, - WarningLevel: 0, - Location: : (13,0)-(14,35), - MessageFormat: Specified member {0} on mapping target type {1} was not found, + Location: /* + +[MapProperty("Value1", "ValueC.Value3")] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +private partial B MapObj(A source); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (13,0)-(14,35), Message: Specified member ValueC.Value3 on mapping target type B was not found, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG005, + Title: Mapping target member not found, + MessageFormat: Specified member {0} on mapping target type {1} was not found, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopCtor.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopCtor.verified.txt index 290b35ce47..ed537c8e05 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopCtor.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopCtor.verified.txt @@ -1,34 +1,63 @@ { Diagnostics: [ { - Id: RMG031, - Title: Reference loop detected while mapping to a constructor parameter, + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), + Message: Reference loop detected while mapping from A.Parent to the constructor parameter parent of B, consider ignoring this member or mark another constructor as mapping constructor, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,84), - MessageFormat: Reference loop detected while mapping from {0} to the constructor parameter {2} of {1}, consider ignoring this member or mark another constructor as mapping constructor, - Message: Reference loop detected while mapping from A.Parent to the constructor parameter parent of B, consider ignoring this member or mark another constructor as mapping constructor, - Category: Mapper + Descriptor: { + Id: RMG031, + Title: Reference loop detected while mapping to a constructor parameter, + MessageFormat: Reference loop detected while mapping from {0} to the constructor parameter {2} of {1}, consider ignoring this member or mark another constructor as mapping constructor, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG013, - Title: No accessible constructor with mappable arguments found, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,84), - MessageFormat: {0} has no accessible constructor with mappable arguments, + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), Message: B has no accessible constructor with mappable arguments, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG013, + Title: No accessible constructor with mappable arguments found, + MessageFormat: {0} has no accessible constructor with mappable arguments, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), + Message: The member Parent on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,84), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member Parent on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopInitProperty.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopInitProperty.verified.txt index e4ac1bc145..7ae259b0cb 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopInitProperty.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopInitProperty.verified.txt @@ -1,34 +1,63 @@ { Diagnostics: [ { - Id: RMG030, - Title: Reference loop detected while mapping to an init only member, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(11,84), - MessageFormat: Reference loop detected while mapping from {0} to the init only member {1}, consider ignoring this member, + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), Message: Reference loop detected while mapping from A.Parent to the init only member B.Parent, consider ignoring this member, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG030, + Title: Reference loop detected while mapping to an init only member, + MessageFormat: Reference loop detected while mapping from {0} to the init only member {1}, consider ignoring this member, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG020, - Title: Source member is not mapped to any target member, + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), + Message: The member Parent on the mapping source type A is not mapped to any member on the mapping target type B, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,84), - MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, - Message: The member Parent on the mapping source type A is not mapped to any member on the mapping target type B, - Category: Mapper + Descriptor: { + Id: RMG020, + Title: Source member is not mapped to any target member, + MessageFormat: The member {0} on the mapping source type {1} is not mapped to any member on the mapping target type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,84), + Message: The member Parent on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,84), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Parent on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.TwoQueryableMappingsWithNamedUsedMappingsAndAmbiguousName.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.TwoQueryableMappingsWithNamedUsedMappingsAndAmbiguousName.verified.txt index a2b40d8f22..9adf3dc393 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.TwoQueryableMappingsWithNamedUsedMappingsAndAmbiguousName.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.TwoQueryableMappingsWithNamedUsedMappingsAndAmbiguousName.verified.txt @@ -1,24 +1,42 @@ { Diagnostics: [ { - Id: RMG062, - Title: The referenced mapping name is ambiguous, - Severity: Error, - WarningLevel: 0, - Location: : (14,1)-(14,87), - MessageFormat: The referenced mapping name {0} is ambiguous, use a unique name, + Location: /* + +[MapProperty(nameof(A.StringValue1), nameof(B.StringValue1), Use = nameof(ModifyString)] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +[MapProperty(nameof(A.StringValue2), nameof(B.StringValue2), Use = nameof(ModifyString2)] +*/ + : (14,1)-(14,87), Message: The referenced mapping name ModifyString is ambiguous, use a unique name, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG062, + Title: The referenced mapping name is ambiguous, + MessageFormat: The referenced mapping name {0} is ambiguous, use a unique name, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG062, - Title: The referenced mapping name is ambiguous, - Severity: Error, - WarningLevel: 0, - Location: : (14,1)-(14,87), - MessageFormat: The referenced mapping name {0} is ambiguous, use a unique name, + Location: /* + +[MapProperty(nameof(A.StringValue1), nameof(B.StringValue1), Use = nameof(ModifyString)] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +[MapProperty(nameof(A.StringValue2), nameof(B.StringValue2), Use = nameof(ModifyString2)] +*/ + : (14,1)-(14,87), Message: The referenced mapping name ModifyString is ambiguous, use a unique name, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG062, + Title: The referenced mapping name is ambiguous, + MessageFormat: The referenced mapping name {0} is ambiguous, use a unique name, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassNonInlinedMethod.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassNonInlinedMethod.verified.txt index 7186af5608..da49383824 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassNonInlinedMethod.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassNonInlinedMethod.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG068, - Title: Cannot inline user implemented queryable expression mapping, + Location: /* +{ + private partial System.Linq.IQueryable Map(System.Linq.IQueryable source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*/ + : (11,4)-(11,84), + Message: Cannot inline user implemented queryable expression mapping, Severity: Info, WarningLevel: 1, - Location: : (11,4)-(11,84), - MessageFormat: Cannot inline user implemented queryable expression mapping, - Message: Cannot inline user implemented queryable expression mapping, - Category: Mapper + Descriptor: { + Id: RMG068, + Title: Cannot inline user implemented queryable expression mapping, + MessageFormat: Cannot inline user implemented queryable expression mapping, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ReferenceHandlingTest.ManuallyMappedPropertiesShouldWork.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/ReferenceHandlingTest.ManuallyMappedPropertiesShouldWork.verified.txt index e26ebb7473..c1b2c04461 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ReferenceHandlingTest.ManuallyMappedPropertiesShouldWork.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/ReferenceHandlingTest.ManuallyMappedPropertiesShouldWork.verified.txt @@ -1,35 +1,65 @@ { Diagnostics: [ { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +{ + [MapProperty("Value", "MyValue")] private partial B MapToB(A source); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +[MapProperty("Value", "MyValue2")] private partial B MapToB1(A source); +*/ + : (11,4)-(11,73), + Message: The member MyValue2 on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (11,4)-(11,73), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member MyValue2 on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* + [MapProperty("Value", "MyValue")] private partial B MapToB(A source); +[MapProperty("Value", "MyValue2")] private partial B MapToB1(A source); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (12,0)-(12,71), + Message: The member MyValue on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (12,0)-(12,71), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member MyValue on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } }, { - Id: RMG060, - Title: Multiple user mappings discovered without specifying an explicit default, + Location: /* + [MapProperty("Value", "MyValue")] private partial B MapToB(A source); +[MapProperty("Value", "MyValue2")] private partial B MapToB1(A source); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (12,0)-(12,71), + Message: Multiple user mappings discovered for the mapping from A to B without specifying an explicit default, Severity: Warning, WarningLevel: 1, - Location: : (12,0)-(12,71), - HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG060, - MessageFormat: Multiple user mappings discovered for the mapping from {0} to {1} without specifying an explicit default, - Message: Multiple user mappings discovered for the mapping from A to B without specifying an explicit default, - Category: Mapper + Descriptor: { + Id: RMG060, + Title: Multiple user mappings discovered without specifying an explicit default, + HelpLink: https://localhost:3000/docs/configuration/analyzer-diagnostics/RMG060, + MessageFormat: Multiple user mappings discovered for the mapping from {0} to {1} without specifying an explicit default, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/UnsafeAccessorTest.PrivateNestedNullableProperty.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/UnsafeAccessorTest.PrivateNestedNullableProperty.verified.txt new file mode 100644 index 0000000000..c49e0fcf2e --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/UnsafeAccessorTest.PrivateNestedNullableProperty.verified.txt @@ -0,0 +1,26 @@ +{ + Diagnostics: [ + { + Location: /* +{ + [MapProperty("nested.value", "value")] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +partial B Map(A source); +^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(12,24), + Message: Mapping the nullable source property nested.value of A to the target property value of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.AdditionalNullableIntParameter.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.AdditionalNullableIntParameter.verified.txt new file mode 100644 index 0000000000..514bbcce2d --- /dev/null +++ b/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.AdditionalNullableIntParameter.verified.txt @@ -0,0 +1,24 @@ +{ + Diagnostics: [ + { + Location: /* +{ + partial B Map(A src, int? value); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (11,4)-(11,37), + Message: Mapping the nullable source property value of int? to the target property Value of B which is not nullable, + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: RMG089, + Title: Mapping nullable source to non-nullable target member, + MessageFormat: Mapping the nullable source property {0} of {1} to the target property {2} of {3} which is not nullable, + Category: Mapper, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.ExplicitDefaultShouldDiagnosticAndNotBeUsedAsDefault.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.ExplicitDefaultShouldDiagnosticAndNotBeUsedAsDefault.verified.txt index 2b3eb1b661..551c3385d4 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.ExplicitDefaultShouldDiagnosticAndNotBeUsedAsDefault.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.ExplicitDefaultShouldDiagnosticAndNotBeUsedAsDefault.verified.txt @@ -1,24 +1,45 @@ { Diagnostics: [ { - Id: RMG081, - Title: A mapping method with additional parameters cannot be a default mapping, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(12,32), - MessageFormat: The mapping method {0} has additional parameters and therefore cannot be a default mapping, + Location: /* +{ + [UserMapping(Default = true)] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +partial B Map(A src, int value); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +partial E MapNested(D src); +*/ + : (11,4)-(12,32), Message: The mapping method Map has additional parameters and therefore cannot be a default mapping, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG081, + Title: A mapping method with additional parameters cannot be a default mapping, + MessageFormat: The mapping method {0} has additional parameters and therefore cannot be a default mapping, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } }, { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* +partial B Map(A src, int value); +partial E MapNested(D src); +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (13,0)-(13,27), + Message: The member Value on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (13,0)-(13,27), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Value on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.ShouldNotBeMarkedAsImplicitDefaultMapping.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.ShouldNotBeMarkedAsImplicitDefaultMapping.verified.txt index ca55107bb2..b10a346bd7 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.ShouldNotBeMarkedAsImplicitDefaultMapping.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/UserMethodAdditionalParametersTest.ShouldNotBeMarkedAsImplicitDefaultMapping.verified.txt @@ -1,14 +1,24 @@ { Diagnostics: [ { - Id: RMG012, - Title: Source member was not found for target member, + Location: /* + partial B Map(A src, int value); +partial E MapNested(D src); +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +*/ + : (12,0)-(12,27), + Message: The member Value on the mapping target type B was not found on the mapping source type A, Severity: Warning, WarningLevel: 1, - Location: : (12,0)-(12,27), - MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, - Message: The member Value on the mapping target type B was not found on the mapping source type A, - Category: Mapper + Descriptor: { + Id: RMG012, + Title: Source member was not found for target member, + MessageFormat: The member {0} on the mapping target type {1} was not found on the mapping source type {2}, + Category: Mapper, + DefaultSeverity: Warning, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.DisabledAutoUserMappingsMultipleDefaultUserMappingsShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.DisabledAutoUserMappingsMultipleDefaultUserMappingsShouldDiagnostic.verified.txt index 7296d18baa..3aef187a7b 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.DisabledAutoUserMappingsMultipleDefaultUserMappingsShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.DisabledAutoUserMappingsMultipleDefaultUserMappingsShouldDiagnostic.verified.txt @@ -1,14 +1,25 @@ { Diagnostics: [ { - Id: RMG059, - Title: Multiple default user mappings found, only one is allowed, - Severity: Error, - WarningLevel: 0, - Location: : (14,0)-(15,47), - MessageFormat: Multiple default user mappings for the mapping from {0} to {1} found, only one is allowed, + Location: /* + +[UserMapping(Default = true)] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +public static int IntMapping2(int x) => x + 20; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*/ + : (14,0)-(15,47), Message: Multiple default user mappings for the mapping from int to int found, only one is allowed, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG059, + Title: Multiple default user mappings found, only one is allowed, + MessageFormat: Multiple default user mappings for the mapping from {0} to {1} found, only one is allowed, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.MultipleDefaultUserMappingsShouldDiagnostic.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.MultipleDefaultUserMappingsShouldDiagnostic.verified.txt index 7296d18baa..3aef187a7b 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.MultipleDefaultUserMappingsShouldDiagnostic.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.MultipleDefaultUserMappingsShouldDiagnostic.verified.txt @@ -1,14 +1,25 @@ { Diagnostics: [ { - Id: RMG059, - Title: Multiple default user mappings found, only one is allowed, - Severity: Error, - WarningLevel: 0, - Location: : (14,0)-(15,47), - MessageFormat: Multiple default user mappings for the mapping from {0} to {1} found, only one is allowed, + Location: /* + +[UserMapping(Default = true)] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +public static int IntMapping2(int x) => x + 20; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*/ + : (14,0)-(15,47), Message: Multiple default user mappings for the mapping from int to int found, only one is allowed, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG059, + Title: Multiple default user mappings found, only one is allowed, + MessageFormat: Multiple default user mappings for the mapping from {0} to {1} found, only one is allowed, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.UserMappingAttributeOnNonMappingMethod.verified.txt b/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.UserMappingAttributeOnNonMappingMethod.verified.txt index 084830bb18..c9be517c02 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.UserMappingAttributeOnNonMappingMethod.verified.txt +++ b/test/Riok.Mapperly.Tests/_snapshots/UserMethodTest.UserMappingAttributeOnNonMappingMethod.verified.txt @@ -1,14 +1,25 @@ { Diagnostics: [ { - Id: RMG001, - Title: Has an unsupported mapping method signature, - Severity: Error, - WarningLevel: 0, - Location: : (11,4)-(12,47), - MessageFormat: {0} has an unsupported mapping method signature, + Location: /* +{ + [UserMapping] + ^^^^^^^^^^^^^ +public static void NotAMappingMethod2(int s) {} +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +public partial B Map(A s); +*/ + : (11,4)-(12,47), Message: NotAMappingMethod2 has an unsupported mapping method signature, - Category: Mapper + Severity: Error, + Descriptor: { + Id: RMG001, + Title: Has an unsupported mapping method signature, + MessageFormat: {0} has an unsupported mapping method signature, + Category: Mapper, + DefaultSeverity: Error, + IsEnabledByDefault: true + } } ] } \ No newline at end of file