add the ASCII-only source rule and the visual-verification note to CLAUDE.md
This commit is contained in:
@@ -60,6 +60,13 @@ keep the citation accurate.
|
|||||||
* don't use abbreviations, except very common ones ("s" for seconds, "min", "max", etc.)
|
* don't use abbreviations, except very common ones ("s" for seconds, "min", "max", etc.)
|
||||||
* if a variable holds a value that has a unit or if a function returns a value that has a unit, append that unit to the name (e.g. "m_shipVelocity_mps", "getAcceleration_mpss()")
|
* if a variable holds a value that has a unit or if a function returns a value that has a unit, append that unit to the name (e.g. "m_shipVelocity_mps", "getAcceleration_mpss()")
|
||||||
* always enclose scopes in braces
|
* always enclose scopes in braces
|
||||||
|
* keep source files ASCII-only. A non-ASCII character needed at runtime (a glyph in a
|
||||||
|
UI string, a symbol drawn on a widget) is written as its code point with a comment
|
||||||
|
naming it (`const QChar shiftGlyph(0x21E7); // U+21E7 UPWARDS WHITE ARROW`), never
|
||||||
|
as a literal character: MSVC 2017 does not read the sources as UTF-8 by default and
|
||||||
|
silently mangles them. Never round-trip a source file through
|
||||||
|
`Get-Content`/`Set-Content` either: Windows PowerShell reads it as ANSI and writes
|
||||||
|
it back double-encoded with a BOM. Use the Edit/Write tools.
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
@@ -96,6 +103,15 @@ output directories and copies the Qt DLLs.
|
|||||||
Run the app: `build/DotaFactory/Debug/app/DotaFactory.exe`, optionally
|
Run the app: `build/DotaFactory/Debug/app/DotaFactory.exe`, optionally
|
||||||
`--replay <file>` for view-only playback of a recorded run.
|
`--replay <file>` for view-only playback of a recorded run.
|
||||||
|
|
||||||
|
**Visual verification is the user's job.** Screen-capturing the app window does not
|
||||||
|
work here: `CopyFromScreen` and `PrintWindow` both return a blank white client area
|
||||||
|
even while the app is running and rendering normally, because the capture cannot read
|
||||||
|
the composited surface of the `QOpenGLWidget`-backed window. A blank capture therefore
|
||||||
|
says nothing about whether the UI works, so do not read one as a regression and do not
|
||||||
|
try to work around it. To check a UI change: build, run the tests, launch the app, and
|
||||||
|
ask the user to look at it. Redirecting the process's stdout/stderr to a file does
|
||||||
|
work and is worth checking for Qt warnings.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
Catch2, single executable, links `lib` only — no QApplication, no display.
|
Catch2, single executable, links `lib` only — no QApplication, no display.
|
||||||
|
|||||||
Reference in New Issue
Block a user