summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-09 22:33:45 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-09 22:33:45 -0400
commit4f5f463bd227a81c26224a81b178e2221946b9b2 (patch)
tree7a25745867b296f57889051aecf9bb23ea086bbd /docs
parentf52f7ca36f2ecf3d4478c5bc1e9cd95e5ff53929 (diff)
downloadSMAPI-4f5f463bd227a81c26224a81b178e2221946b9b2.tar.gz
SMAPI-4f5f463bd227a81c26224a81b178e2221946b9b2.tar.bz2
SMAPI-4f5f463bd227a81c26224a81b178e2221946b9b2.zip
warn when directly using a net field that has a non-net wrapper (#471)
Diffstat (limited to 'docs')
-rw-r--r--docs/mod-build-config.md9
-rw-r--r--docs/screenshots/code-analyzer-example.pngbin5696 -> 4022 bytes
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/mod-build-config.md b/docs/mod-build-config.md
index 71a2518a..44242160 100644
--- a/docs/mod-build-config.md
+++ b/docs/mod-build-config.md
@@ -182,6 +182,15 @@ Suggested fix:
if (item != null && item.category == 0)
```
+### SMAPI002
+**Avoid net fields when possible:**
+> '{{expression}}' is a {{net type}} field; consider using the {{property name}} property instead.
+
+Your code accesses a net field, which has some unusual behavior (see [SMAPI001](#SMAPI001)). This
+field has an equivalent non-net property that avoids those issues.
+
+Suggested fix: access the suggested property name instead.
+
## Troubleshoot
### "Failed to find the game install path"
That error means the package couldn't find your game. You can specify the game path yourself; see
diff --git a/docs/screenshots/code-analyzer-example.png b/docs/screenshots/code-analyzer-example.png
index 2723b164..3b930dc5 100644
--- a/docs/screenshots/code-analyzer-example.png
+++ b/docs/screenshots/code-analyzer-example.png
Binary files differ