Skip to content

Commit

Permalink
update book with warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Oct 15, 2023
1 parent df048ce commit 0b1a2dc
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 25 deletions.
55 changes: 30 additions & 25 deletions book/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,39 @@

[Introduction](README.md)

- [Installation](installation.md)
- [Installation](installation.md)

# User Guide

- [Configuration](configuration/index.md)
- [Minimum](configuration/minimum.md)
- [Version](configuration/version.md)
- [Addon](configuration/addon.md)
- [Commands](commands/index.md)
- [new](commands/new.md)
- [dev](commands/dev.md)
- [launch](commands/launch.md)
- [build](commands/build.md)
- [release](commands/release.md)
- [script](commands/script.md)
- [Rhai](rhai/index.md)
- [Libraries](rhai/library/index.md)
- [Logging](rhai/library/logging.md)
- [HEMTT](rhai/library/hemtt.md)
- [Project](rhai/library/project.md)
- [File System](rhai/library/filesystem.md)
- [Time](rhai/library/time.md)
- [Hooks](rhai/hooks/index.md)
- [Examples](rhai/hooks/examples.md)
- [Scripts](rhai/scripts/index.md)
- [Examples](rhai/scripts/examples.md)
- [Linting](linting.md)
- [ArmaScriptCompiler](armascriptcompiler.md)
- [Configuration](configuration/index.md)
- [Minimum](configuration/minimum.md)
- [Version](configuration/version.md)
- [Addon](configuration/addon.md)
- [Commands](commands/index.md)
- [new](commands/new.md)
- [dev](commands/dev.md)
- [launch](commands/launch.md)
- [build](commands/build.md)
- [release](commands/release.md)
- [script](commands/script.md)
- [Rhai](rhai/index.md)
- [Libraries](rhai/library/index.md)
- [Logging](rhai/library/logging.md)
- [HEMTT](rhai/library/hemtt.md)
- [Project](rhai/library/project.md)
- [File System](rhai/library/filesystem.md)
- [Time](rhai/library/time.md)
- [Hooks](rhai/hooks/index.md)
- [Examples](rhai/hooks/examples.md)
- [Scripts](rhai/scripts/index.md)
- [Examples](rhai/scripts/examples.md)
- [Linting](linting.md)
- [ArmaScriptCompiler](armascriptcompiler.md)

# Reference

- [Analysis](analysis/index.md)
- [Config](analysis/config.md)

<!--
# Modding Guide
Expand Down
65 changes: 65 additions & 0 deletions book/analysis/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Config

HEMTT will provide warnings for common issues in your config, in both the preprocessing and rapifying stages.

## Preprocessor Warnings

### [PW1] Redefine Macro

This warning is emitted when a macro is defined more than once.

```cpp
#define FOO 1
#define FOO 2
```
It may also appear when a macro is defined in a file that is included more than once.
```cpp
// foo.hpp
#define FOO 1
// bar.hpp
#include "foo.hpp"
#include "foo.hpp"
```

### [PW2] Invalid Config Case

This warning is emitted when `config.cpp` is not all lowercase, e.g. `Config.cpp`.

## Rapify Warnings

### [CW1] Parent Case Mismatch

This warning is emitted when an inherited class does not match the case of the defined class.

```cpp
class Parent;
class Child: parent {};
```
### [CW2] CfgMagazineWells was not found in CfgMagazines
This warning is emitted when a `CfgMagazineWells` entry is not found in `CfgMagazines`.
In this example, `abe_plantain` is not found in `CfgMagazines`, and a warning is emitted.
```admonish note title=""
Only entries that start with the project's [prefix](../configuration/index.md#minimum-configuration). No warning will be emitted for `external_banana`.
```

```cpp
class CfgMagazineWells {
class abe_banana_shooter {
ADDON[] = {
"abe_cavendish",
"abe_plantain"
"external_banana"
};
};
};
class CfgMagazines {
class abe_cavendish { ... };
};
```
6 changes: 6 additions & 0 deletions book/analysis/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Analysis

HEMTT will analyze your project for some common issues.

[Config](./config.md)
SQF - Coming Soon

0 comments on commit 0b1a2dc

Please sign in to comment.