Skip to content

Commit 0b1a2dc

Browse files
committed
update book with warnings
1 parent df048ce commit 0b1a2dc

File tree

3 files changed

+101
-25
lines changed

3 files changed

+101
-25
lines changed

book/SUMMARY.md

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,39 @@
22

33
[Introduction](README.md)
44

5-
- [Installation](installation.md)
5+
- [Installation](installation.md)
66

77
# User Guide
88

9-
- [Configuration](configuration/index.md)
10-
- [Minimum](configuration/minimum.md)
11-
- [Version](configuration/version.md)
12-
- [Addon](configuration/addon.md)
13-
- [Commands](commands/index.md)
14-
- [new](commands/new.md)
15-
- [dev](commands/dev.md)
16-
- [launch](commands/launch.md)
17-
- [build](commands/build.md)
18-
- [release](commands/release.md)
19-
- [script](commands/script.md)
20-
- [Rhai](rhai/index.md)
21-
- [Libraries](rhai/library/index.md)
22-
- [Logging](rhai/library/logging.md)
23-
- [HEMTT](rhai/library/hemtt.md)
24-
- [Project](rhai/library/project.md)
25-
- [File System](rhai/library/filesystem.md)
26-
- [Time](rhai/library/time.md)
27-
- [Hooks](rhai/hooks/index.md)
28-
- [Examples](rhai/hooks/examples.md)
29-
- [Scripts](rhai/scripts/index.md)
30-
- [Examples](rhai/scripts/examples.md)
31-
- [Linting](linting.md)
32-
- [ArmaScriptCompiler](armascriptcompiler.md)
9+
- [Configuration](configuration/index.md)
10+
- [Minimum](configuration/minimum.md)
11+
- [Version](configuration/version.md)
12+
- [Addon](configuration/addon.md)
13+
- [Commands](commands/index.md)
14+
- [new](commands/new.md)
15+
- [dev](commands/dev.md)
16+
- [launch](commands/launch.md)
17+
- [build](commands/build.md)
18+
- [release](commands/release.md)
19+
- [script](commands/script.md)
20+
- [Rhai](rhai/index.md)
21+
- [Libraries](rhai/library/index.md)
22+
- [Logging](rhai/library/logging.md)
23+
- [HEMTT](rhai/library/hemtt.md)
24+
- [Project](rhai/library/project.md)
25+
- [File System](rhai/library/filesystem.md)
26+
- [Time](rhai/library/time.md)
27+
- [Hooks](rhai/hooks/index.md)
28+
- [Examples](rhai/hooks/examples.md)
29+
- [Scripts](rhai/scripts/index.md)
30+
- [Examples](rhai/scripts/examples.md)
31+
- [Linting](linting.md)
32+
- [ArmaScriptCompiler](armascriptcompiler.md)
33+
34+
# Reference
35+
36+
- [Analysis](analysis/index.md)
37+
- [Config](analysis/config.md)
3338

3439
<!--
3540
# Modding Guide

book/analysis/config.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Config
2+
3+
HEMTT will provide warnings for common issues in your config, in both the preprocessing and rapifying stages.
4+
5+
## Preprocessor Warnings
6+
7+
### [PW1] Redefine Macro
8+
9+
This warning is emitted when a macro is defined more than once.
10+
11+
```cpp
12+
#define FOO 1
13+
#define FOO 2
14+
```
15+
16+
It may also appear when a macro is defined in a file that is included more than once.
17+
18+
```cpp
19+
// foo.hpp
20+
#define FOO 1
21+
22+
// bar.hpp
23+
#include "foo.hpp"
24+
#include "foo.hpp"
25+
```
26+
27+
### [PW2] Invalid Config Case
28+
29+
This warning is emitted when `config.cpp` is not all lowercase, e.g. `Config.cpp`.
30+
31+
## Rapify Warnings
32+
33+
### [CW1] Parent Case Mismatch
34+
35+
This warning is emitted when an inherited class does not match the case of the defined class.
36+
37+
```cpp
38+
class Parent;
39+
class Child: parent {};
40+
```
41+
42+
### [CW2] CfgMagazineWells was not found in CfgMagazines
43+
44+
This warning is emitted when a `CfgMagazineWells` entry is not found in `CfgMagazines`.
45+
46+
In this example, `abe_plantain` is not found in `CfgMagazines`, and a warning is emitted.
47+
48+
```admonish note title=""
49+
Only entries that start with the project's [prefix](../configuration/index.md#minimum-configuration). No warning will be emitted for `external_banana`.
50+
```
51+
52+
```cpp
53+
class CfgMagazineWells {
54+
class abe_banana_shooter {
55+
ADDON[] = {
56+
"abe_cavendish",
57+
"abe_plantain"
58+
"external_banana"
59+
};
60+
};
61+
};
62+
class CfgMagazines {
63+
class abe_cavendish { ... };
64+
};
65+
```

book/analysis/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Analysis
2+
3+
HEMTT will analyze your project for some common issues.
4+
5+
[Config](./config.md)
6+
SQF - Coming Soon

0 commit comments

Comments
 (0)