Skip to content

Quality Assurance#305

Merged
davidp57 merged 3 commits intodevelop/v6-new-build-systemfrom
feat-quality-assurance
Mar 14, 2026
Merged

Quality Assurance#305
davidp57 merged 3 commits intodevelop/v6-new-build-systemfrom
feat-quality-assurance

Conversation

@davidp57
Copy link
Copy Markdown
Member

Summary

Adds a complete Lua unit test suite (~915 tests across 31 suites), static analysis tooling, a GitHub Actions CI/CD pipeline, and restructures all documentation into a role-based doc/ folder.


What Changed

Lua Scripting

  • All 32 Lua runtime modules formatted with StyLua 2.4.0 (.stylua.toml)
  • LuaLS static analysis configured (.luarc.json) with DCS API type stubs
  • IADS package made optional at mission load time
  • Option to hide radio menus added
  • Various bug fixes and logging improvements across modules

Lua Unit Tests — 31 suites, ~915 tests

Full test coverage for all testable runtime modules using luaunit and a DCS API mock layer (dcs_mocks.lua). Test runner: .\test\lua\run_tests.ps1, exits 0/1.

Covered modules (31)
veaf, veafCacheManager, veafInterpreter, veafTime, veafSecurity, veafNamedPoints, veafShortcuts, veafWeather, dcsDataExport, veafCombatMission, veafAirbases, veafCombatZone, veafUnits, veafAssets, veafRemote, veafMarkers, veafEventHandler, veafSkynetIadsHelper, veafSkynetIadsMonitor, veafGroundAI, veafRadio, veafQraManager, veafAirWaves, veafSanctuary, veafMissileGuardian, veafCasMission, veafTransportMission, veafCarrierOperations, veafMove, veafGrass, veafSpawn

CI/CD — GitHub Actions (.github/workflows/lua-ci.yml)

Two jobs on every push and pull request:

  • lua-unit-tests — Ubuntu, Lua 5.1, runs all test_*.lua suites
  • stylua-check — verifies formatting of src/scripts/veaf/ against .stylua.toml

Documentation Restructure

All documentation reorganized into doc/ by role:

File Audience
doc/USER_GUIDE.md Players
doc/MISSION_MAKER_GUIDE.md Mission makers
doc/DEVELOPER_GUIDE.md Developers (merged ARCHITECTURE + BUILD_WORKFLOW + DETAILED_MANUAL)
doc/LUA_API_REFERENCE.md Lua API reference
doc/TOOLS_REFERENCE.md veaf-tools.exe CLI reference
doc/TESTING.md Test suite and CI/CD guide

README.md rewritten as a succinct role-based index.
Removed: old_documentation/ (Hugo/Node.js era), documentation/ (empty skeleton), and 9 redundant root-level .md files.


Breaking Changes

None. This PR only adds tooling and documentation on top of the existing branch.


Testing

# Lua unit tests (requires Lua 5.1)
.\test\lua\run_tests.ps1

# StyLua formatting check
stylua --check src/scripts/veaf/

Related

  • Base branch: develop/v6-new-build-system
  • Feature branch: feat-quality-assurance

- Add doc/ with 6 role-based guides:
  DEVELOPER_GUIDE.md (merged ARCHITECTURE + BUILD_WORKFLOW + DETAILED_MANUAL)
  MISSION_MAKER_GUIDE.md (new: mission setup, modules, build workflow)
  TESTING.md (new: Lua test suite, CI/CD pipeline)
  USER_GUIDE.md (from VEAF_USER_GUIDE_EN.md)
  LUA_API_REFERENCE.md (from VEAF_LUA_API_REFERENCE.md)
  TOOLS_REFERENCE.md (from VEAF_TOOLS_GUIDE.md)
- Rewrite README.md: succinct, role-based table with links to doc/
- Remove redundant root-level .md files (ARCHITECTURE, BUILD_WORKFLOW,
  DETAILED_MANUAL, VEAF_TOOLS_GUIDE, VEAF_USER_GUIDE*, VEAF_LUA_API_REFERENCE,
  SYNTAXE_CORRECTE_COMMANDES, project_rewrite_in_python)
- Remove old_documentation/ (Hugo/Node.js era, obsolete) and documentation/ (empty skeleton)
- Add .github/workflows/lua-ci.yml: Lua unit tests + StyLua formatting check
- Add test/lua/: 31 test suites (~915 tests) covering all Lua runtime modules
- Add .luarc.json and .stylua.toml for LuaLS and StyLua configuration
- Format all Lua sources with StyLua 2.4.0
- Switch .stylua.toml to line_endings = Unix
- Add .gitattributes: *.lua eol=lf, *.cmd/*.bat/*.ps1 eol=crlf
- Reformat all Lua sources with StyLua in Unix mode
Copilot AI review requested due to automatic review settings March 14, 2026 16:21
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 20000 lines

@davidp57 davidp57 merged commit c7e4581 into develop/v6-new-build-system Mar 14, 2026
4 checks passed
@davidp57 davidp57 deleted the feat-quality-assurance branch March 14, 2026 16:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Cette PR renforce la qualité du projet en ajoutant une suite de tests Lua, en standardisant le formatage/analyses statiques, en mettant en place une CI GitHub Actions, et en restructurant la documentation dans doc/.

Changes:

  • Ajout d’une CI GitHub Actions pour exécuter les tests Lua 5.1 et vérifier le formatage StyLua.
  • Ajout/centralisation des configurations StyLua et LuaLS, et reformatage de nombreux modules Lua.
  • Restructuration majeure de la documentation (nouveau dossier doc/) et suppression des anciennes docs.

Reviewed changes

Copilot reviewed 67 out of 135 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/scripts/veaf/veafTime.lua Reformatage StyLua et ajustements mineurs de style.
src/scripts/veaf/veafSecurity.lua Reformatage + nettoyage de blocs/retours pour lisibilité.
src/scripts/veaf/veafSanctuary.lua Reformatage de gros appels/logs et conditions.
src/scripts/veaf/veafRemote.lua Reformatage; amélioration de lisibilité des logs/callbacks NIOD.
src/scripts/veaf/veafRadio.lua Reformatage; remaniement de constructions de commandes SRS/STTS.
src/scripts/veaf/veafMissileGuardian.lua Reformatage + petites simplifications (regex, concat).
src/scripts/veaf/veafMarkers.lua Harmonisation des chaînes et conditions.
src/scripts/veaf/veafInterpreter.lua Harmonisation quotes + conditions/guard clauses.
src/scripts/veaf/veafGroundAI.lua Reformatage + multi-lignes pour logs/conditions.
src/scripts/veaf/veafEventHandler.lua Normalisation des tables (virgules finales) + blocs if.
src/scripts/veaf/veafCacheManager.lua Correction/clarification de la logique de validité TTL.
src/scripts/veaf/veafAssets.lua Reformatage et consolidation de chaînes multi-lignes.
src/scripts/veaf/veafAirbases.lua Reformatage + simplification de conditions/tri.
src/scripts/veaf/veafAirWaves.lua Reformatage + multi-lignes pour conditions et logs.
src/scripts/veaf/dcsDataExport.lua Reformatage + corrections de quotes/concat, I/O plus lisible.
.github/workflows/lua-ci.yml Ajout pipeline CI : tests Lua 5.1 + check StyLua.
.luarc.json Ajout config LuaLS + globals DCS/VEAF + ignore dirs.
.stylua.toml Ajout config StyLua (largeur, quotes, LF, etc.).
.gitattributes Normalisation des fins de ligne (LF) + exceptions Windows scripts.
.vscode/settings.json Ajustements VS Code (format-on-save Lua, stylua path, auto-approve).
doc/TESTING.md Nouvelle doc pour la suite de tests et la CI.
doc/MISSION_MAKER_GUIDE.md Nouvelle doc "mission maker" consolidée sous doc/.
README.md Réécriture en index orienté rôles vers doc/.
project_rewrite_in_python.md Suppression (doc obsolète).
documentation/ref_index.md Suppression (ancienne doc).
old_documentation/_index.md Suppression (ancienne doc).
old_documentation/_images/readme.md Suppression (ancienne doc).
old_documentation/_images/editor_workflow.xml Suppression (ancienne doc).
old_documentation/QRA.md Suppression (ancienne doc).
old_documentation/Mission programmer/_index.md Suppression (ancienne doc).
old_documentation/Mission maker/third-party/ctld.md Suppression (ancienne doc).
old_documentation/Mission maker/third-party/_index.md Suppression (ancienne doc).
old_documentation/Mission maker/references/group-list.md Suppression (ancienne doc).
old_documentation/Mission maker/references/_index.md Suppression (ancienne doc).
old_documentation/Mission maker/modules/veafUnits.md Suppression (ancienne doc).
old_documentation/Mission maker/modules/veafSpawn.md Suppression (ancienne doc).
old_documentation/Mission maker/modules/veafGrass.md Suppression (ancienne doc).
old_documentation/Mission maker/modules/veafCombatZone.md Suppression (ancienne doc).
old_documentation/Mission maker/modules/veafCasMission.md Suppression (ancienne doc).
old_documentation/Mission maker/modules/veafCarrierOperations.md Suppression (ancienne doc).
old_documentation/Mission maker/modules/veafAssets.md Suppression (ancienne doc).
old_documentation/Mission maker/modules/_index.md Suppression (ancienne doc).
old_documentation/Mission maker/demo mission.md Suppression (ancienne doc).
old_documentation/Mission maker/concepts/usermarks.md Suppression (ancienne doc).
old_documentation/Mission maker/concepts/radiomenus.md Suppression (ancienne doc).
old_documentation/Mission maker/concepts/load-with-triggers.md Suppression (ancienne doc).
old_documentation/Mission maker/concepts/externaltools.md Suppression (ancienne doc).
old_documentation/Mission maker/concepts/_index.md Suppression (ancienne doc).
old_documentation/Mission maker/_index.md Suppression (ancienne doc).
DETAILED_MANUAL.md Suppression (doc remplacée par doc/DEVELOPER_GUIDE.md selon PR).
BUILD_WORKFLOW.md Suppression (doc remplacée par doc/DEVELOPER_GUIDE.md selon PR).
ARCHITECTURE.md Suppression (doc remplacée par doc/DEVELOPER_GUIDE.md selon PR).

You can also share your feedback on Copilot code review. Take the survey.

end
veaf.loggers
.get(veafRemote.Id)
:error(string.format("niod callback [%s] was called with incorrect parameters :", veaf.p(name), errorMessage))
Comment on lines +124 to +129
}, function(parameters, x, y, z, silent)
veaf.loggers
.get(veafRemote.Id)
:debug(string.format("niod->command %s (%s, %s, %s, %s, %s)", veaf.p(parameters), veaf.p(x), veaf.p(y), veaf.p(z), veaf.p(silent)))
return veafRemote.executeCommand({ x = x or 0, y = y or 0, z = z or 0 }, command .. parameters)
end)
table.insert(var_str_tbl, level .. "}, -- end of " .. name .. "\n")
end
else
log:error("Cannot serialize a $1", type(value))
Comment thread doc/TESTING.md

```toml
column_width = 140
line_endings = "Windows"
Comment thread .vscode/settings.json
"editor.defaultFormatter": "JohnnyMorganz.stylua",
"editor.formatOnSave": true
},
"stylua.styluaPath": "${env:USERPROFILE}\\.local\\bin\\stylua.exe",
Comment thread .vscode/settings.json
Comment on lines +66 to +70
"python-envs.pythonProjects": [],
"chat.tools.terminal.autoApprove": {
"ForEach-Object": true,
"stylua": true
}
Comment on lines 739 to 754
if l_os and STTS then
local cmd = string.format("start /min \"%s\" \"%s\\%s\" %s -f %s -m %s -c %s -p %s -n \"%s\" %s", STTS.DIRECTORY, STTS.DIRECTORY, STTS.EXECUTABLE, contentOption, frequencies, modulations, coalition, STTS.SRS_PORT, name, posOption)
local cmd = string.format(
'start /min "%s" "%s\\%s" %s -f %s -m %s -c %s -p %s -n "%s" %s',
STTS.DIRECTORY,
STTS.DIRECTORY,
STTS.EXECUTABLE,
contentOption,
frequencies,
modulations,
coalition,
STTS.SRS_PORT,
name,
posOption
)
veaf.loggers.get(veafRadio.Id):trace(string.format("executing os command %s", cmd))
local result = l_os.execute(cmd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants