Mal.Mdk2.PbAnalyzers
2.2.0
dotnet add package Mal.Mdk2.PbAnalyzers --version 2.2.0
NuGet\Install-Package Mal.Mdk2.PbAnalyzers -Version 2.2.0
<PackageReference Include="Mal.Mdk2.PbAnalyzers" Version="2.2.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Mal.Mdk2.PbAnalyzers" Version="2.2.0" />
<PackageReference Include="Mal.Mdk2.PbAnalyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Mal.Mdk2.PbAnalyzers --version 2.2.0
#r "nuget: Mal.Mdk2.PbAnalyzers, 2.2.0"
#:package Mal.Mdk2.PbAnalyzers@2.2.0
#addin nuget:?package=Mal.Mdk2.PbAnalyzers&version=2.2.0
#tool nuget:?package=Mal.Mdk2.PbAnalyzers&version=2.2.0
MDK Programmable Block Analyzers
The game Space Engineers (by Keen Software House, no affiliation) supports scripting and modding using the C# language, but limited by a built-in whitelist to protect against dangerous or destructive code. This analyzer aims to inform the developer when they're trying to use parts of the .NET framework or game API they are not allowed to use.
This package is part of the MDK2 project.
Usage:
Simply reference the nuget package in your script project. It should automatically start analyzing your project.
Nuget unfortunately does not notify you when there's updates to nuget packages, so you should check manually now and again, especially after game updates.
Ignoring paths and folders
obj\**\*, MDK\**\* and **\*.debug.cs are ignored by default. To ignore more, edit your
project file and add the following within the first <PropertyGroup>:
<Mdk-IgnorePaths>$(Mdk-IgnorePaths)|PathToIgnore\**\*</Mdk-IgnorePaths>
Add multiple patterns with |. Including $(Mdk-IgnorePaths) adds to the default list
rather than replacing it.
Disclaimer:
These tools are an independent creation and is not endorsed, sponsored, nor affiliated with Keen Software House. "Space Engineers" is a trademark of Keen Software House. All trademarks and copyrights used are properties of their respective owners. The use of "Space Engineers" in these tools is for reference purposes only and does not imply any association or endorsement.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Mal.Mdk2.PbAnalyzers:
| Repository | Stars |
|---|---|
|
malforge/mdk2
|
v.2.2.0
- Using directives your script relies on but that do not survive packing are now a warning. That covers importing a namespace the programmable block does not provide, using aliases, and static imports. Mixing up the mod API namespaces with the ingame ones is the usual cause, so where an ingame version of the namespace exists, the warning points at it. Imports your code does not actually need are left alone, since dropping those breaks nothing.
- Referring to one of your own namespaces by name, such as MyHelpers.Utils, is now an error. Namespaces are removed when your script is packed, so the game would reject the packed script.
v.2.1.17
- Added MDK04 warnings for runtime references to source-defined attribute types trimmed during packing.
v.v.2.1.16
- Added: Namespace whitelist feature - configure allowed namespaces via `namespaces=` in mdk.ini
- Templates now include `namespaces=IngameScript` by default
v.2.1.15
- Fixed: Separator bug where Mdk-IgnorePaths only accepted '|' but props files used ';'
- Fixed: Analyzers now read ignore patterns directly from mdk.ini and mdk.local.ini files
- Changed: ini files are now exposed as AdditionalFiles to analyzers
- Improved: Ignore path separators now accept ';', '|', and ',' for maximum compatibility
2.1.14
- Whitelist update
v.2.1.13
- Fixed broken whitelist
v.2.1.12
- Whitelist update
v.2.1.11
- Package updates
v.2.1.10
- Strange whitelist failure causing ImmutableArray to be considered illegal
v.2.1.9
- Package was not defined as a development dependency
v.2.1.8
- SE 1.204 Update
v.2.1.7
- Fixed harmless warnings
v.2.1.4
- Legal crap, version parity
v.1.0.0
- Initial Release