One-liner koodi: system prompt vaatii rivinvaihdot + staattinen tarkistus
Ollaman system prompt: 'Use proper newlines and indentation'. Staattinen analyysi: havaitsee jos .py-tiedosto on yhdellä rivillä. Native node vaatii rebuildin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2597,6 +2597,10 @@ IMPORTANT: Keep the code SHORT. Max ~60 lines. No comments, no docstrings. Write
|
||||
// Tarkista tyhjät funktiot
|
||||
const emptyFuncs = code.match(/def \w+\([^)]*\):\s*\n\s*(pass|\.\.\.)/g);
|
||||
if (emptyFuncs) staticIssues.push(`${name}: ${emptyFuncs.length} tyhjää funktiota`);
|
||||
// Tarkista one-liner koodi (kaikki yhdellä rivillä)
|
||||
if (lines.length <= 2 && code.length > 200) {
|
||||
staticIssues.push(`${name}: koodi on yhdellä rivillä (${code.length} merkkiä) — generoi uudelleen`);
|
||||
}
|
||||
|
||||
// Tarkista tiedostojen väliset importit (from db import get_db → onko get_db db.py:ssä?)
|
||||
for (const imp of imports) {
|
||||
|
||||
Reference in New Issue
Block a user