Skip to content

Commit

Permalink
Merge pull request #1728 from LORgames/ssurtees/docsCheck
Browse files Browse the repository at this point in the history
Add action to check for and generate missing documentation
  • Loading branch information
starkos authored Oct 21, 2021
2 parents 50051b9 + 0fb9327 commit 6c9fda8
Show file tree
Hide file tree
Showing 57 changed files with 1,373 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
run: make -f Bootstrap.mak linux PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }}
- name: Test
run: bin/${{ matrix.config }}/premake5 test --test-all
- name: Docs check
run: bin/${{ matrix.config }}/premake5 docs-check
- name: Upload Artifacts
if: matrix.config == 'release'
uses: actions/upload-artifact@v2
Expand All @@ -35,6 +37,8 @@ jobs:
run: make -f Bootstrap.mak macosx PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }}
- name: Test
run: bin/${{ matrix.config }}/premake5 test --test-all
- name: Docs check
run: bin/${{ matrix.config }}/premake5 docs-check
- name: Upload Artifacts
if: matrix.config == 'release'
uses: actions/upload-artifact@v2
Expand All @@ -58,6 +62,9 @@ jobs:
- name: Test
run: bin\${{ matrix.config }}\premake5 test --test-all
shell: cmd
- name: Docs check
run: bin\${{ matrix.config }}\premake5 docs-check
shell: cmd
- name: Upload Artifacts
if: matrix.config == 'release'
uses: actions/upload-artifact@v2
Expand Down
9 changes: 9 additions & 0 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
}


newaction {
trigger = "docs-check",
description = "Validates documentation files for Premake APIs",
execute = function ()
include (path.join(corePath, "scripts/docscheck.lua"))
end
}


newaction {
trigger = "test",
description = "Run the automated test suite",
Expand Down
14 changes: 14 additions & 0 deletions scripts/docscheck.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
-- Validate documentation for Premkake APIs.
---

local count = 0
for k,v in pairs(premake.field._loweredList) do
local docfilepath = "../website/docs/" .. k .. ".md"
local exists = os.isfile(docfilepath)
if not exists then
print("Missing documentation file for: ", k)
count = count + 1
end
end
os.exit(count)
2 changes: 1 addition & 1 deletion website/docs/Migrating-From-4.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Many of the old [`flags`](flags.md) have become full-fledged functions. This sho
| `FloatFast`, `FloatStrict` | [`floatingpoint`](floatingpoint.md) |
| `Managed`, `Unsafe` | [`clr`](clr.md) |
| `NativeWChar` | [`nativewchar`](nativewchar.md) |
| `NoEditAndContinue` | [`editandcontinue`](editAndContinue.md) |
| `NoEditAndContinue` | [`editandcontinue`](editandcontinue.md) |
| `NoRTTI` | [`rtti`](rtti.md) |
| `OptimizeSize`, `OptimizeSpeed` | [`optimize`](optimize.md) |
2 changes: 1 addition & 1 deletion website/docs/Project-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
| [display](display.md) | |
| [docdir](docdir.md) | |
| [docname](docname.md) | |
| [editandcontinue](editAndContinue.md) | |
| [editandcontinue](editandcontinue.md) | |
| [editorintegration](editorintegration.md) | Enable or disable IDE integration |
| [enablewarnings](enablewarnings.md) | |
| [endian](endian.md) | |
Expand Down
4 changes: 2 additions & 2 deletions website/docs/Whats-New-in-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ title: What's New in 5.0
* [dependson](dependson.md) (new)
* [disablewarnings](disablewarnings.md) (new)
* [dotnetframework](dotnetframework.md) (new)
* [editandcontinue](editAndContinue.md) (new, replaces flag `NoEditAndContinue`)
* [editandcontinue](editandcontinue.md) (new, replaces flag `NoEditAndContinue`)
* [editorintegration](editorintegration.md) (new)
* [enablewarnings](enablewarnings.md) (new)
* [endian](endian.md) (new)
Expand Down Expand Up @@ -151,6 +151,6 @@ title: What's New in 5.0
* FloatFast, FloatStrict: use [floatingpoint](floatingpoint.md) instead
* Managed, Unsafe: use [clr](clr.md) instead
* NativeWChar: use [nativewchar](nativewchar.md) instead
* NoEditAndContinue: use [editandcontinue](editAndContinue.md) instead
* NoEditAndContinue: use [editandcontinue](editandcontinue.md) instead
* NoRTTI: use [rtti](rtti.md) instead.
* OptimizeSize, OptimizeSpeed: use [optimize](optimize.md) instead
24 changes: 24 additions & 0 deletions website/docs/androidapilevel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
androidapilevel - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
androidapilevel (value)
```

### Parameters ###

`value` - needs documentation.

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 14 or later.

### Examples ###

```lua
androidapilevel (value)
```

24 changes: 24 additions & 0 deletions website/docs/androidapplibname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
androidapplibname - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
androidapplibname (value)
```

### Parameters ###

`value` - needs documentation.

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 14 or later.

### Examples ###

```lua
androidapplibname (value)
```

24 changes: 24 additions & 0 deletions website/docs/assemblydebug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
assemblydebug - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
assemblydebug (value)
```

### Parameters ###

`value` - needs documentation.

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 16 or later.

### Examples ###

```lua
assemblydebug (value)
```

29 changes: 29 additions & 0 deletions website/docs/boundscheck.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
boundscheck - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
boundscheck (value)
```

### Parameters ###

`value` is one of:

* `Default`: needs documentation
* `Off`: needs documentation
* `On`: needs documentation
* `SafeOnly`: needs documentation

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 14 or later.

### Examples ###

```lua
boundscheck (value)
```

30 changes: 30 additions & 0 deletions website/docs/checkaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
checkaction - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
checkaction (value)
```

### Parameters ###

`value` is one of:

* `Default`: needs documentation
* `D`: needs documentation
* `C`: needs documentation
* `Halt`: needs documentation
* `Context`: needs documentation

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 16 or later.

### Examples ###

```lua
checkaction (value)
```

29 changes: 29 additions & 0 deletions website/docs/compilationmodel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
compilationmodel - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
compilationmodel (value)
```

### Parameters ###

`value` is one of:

* `Default`: needs documentation
* `File`: needs documentation
* `Package`: needs documentation
* `Project`: needs documentation

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 14 or later.

### Examples ###

```lua
compilationmodel (value)
```

24 changes: 24 additions & 0 deletions website/docs/computetargets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
computetargets - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
computetargets (value)
```

### Parameters ###

`value` - needs documentation.

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 16 or later.

### Examples ###

```lua
computetargets (value)
```

24 changes: 24 additions & 0 deletions website/docs/conformancemode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
conformancemode - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
conformancemode (value)
```

### Parameters ###

`value` - needs documentation.

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 beta 1 or later.

### Examples ###

```lua
conformancemode (value)
```

4 changes: 2 additions & 2 deletions website/docs/debugformat.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ debugformat "format"
|-------------|---------------------------------------------------------------------------------------------|
| c7 | Specifies that MSVC should store debuginfo in the objects rather than a separate .pdb file. |

**Note for Visual Studio Users:** Use [editAndContinue](editAndContinue.md) to control the `/Zi` and `/ZI` switches; see [this discussion](https://github.com/premake/premake-core/issues/1425) for more information.
**Note for Visual Studio Users:** Use [editandcontinue](editandcontinue.md) to control the `/Zi` and `/ZI` switches; see [this discussion](https://github.com/premake/premake-core/issues/1425) for more information.

### Applies To ###

Expand All @@ -24,5 +24,5 @@ Premake 5.0 or later.

### See Also ###

- [editAndContinue](editAndContinue.md)
- [editandcontinue](editandcontinue.md)

29 changes: 29 additions & 0 deletions website/docs/debuggerflavor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
debuggerflavor - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
debuggerflavor (value)
```

### Parameters ###

`value` is one of:

* `Local`: needs documentation
* `Remote`: needs documentation
* `WebBrowser`: needs documentation
* `WebService`: needs documentation

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 14 or later.

### Examples ###

```lua
debuggerflavor (value)
```

24 changes: 24 additions & 0 deletions website/docs/dependenciesfile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
dependenciesfile - This page was auto-generated. Feel free to help us improve the documentation by creating a pull request.

```lua
dependenciesfile (value)
```

### Parameters ###

`value` - needs documentation.

## Applies To ###

The `config` scope.

### Availability ###

Premake 5.0.0 alpha 14 or later.

### Examples ###

```lua
dependenciesfile (value)
```

Loading

0 comments on commit 6c9fda8

Please sign in to comment.