@@ -258,26 +258,26 @@ jobs:
258258
259259 # Validate TOML structure using Python 3.11+ tomllib
260260 python3 -c "
261- import tomllib, sys
262- with open('eclexiaiser.toml', 'rb') as f :
263- data = tomllib.load(f)
264- project = data.get('project', {})
265- if not project.get('name', '').strip() :
266- print('ERROR : project.name is required', file=sys.stderr)
267- sys.exit(1)
268- functions = data.get('functions', [])
269- if not functions :
270- print('ERROR : at least one [[functions]] entry is required', file=sys.stderr)
271- sys.exit(1)
272- for fn in functions :
273- if not fn.get('name', '').strip() :
274- print('ERROR : function name cannot be empty', file=sys.stderr)
275- sys.exit(1)
276- if not fn.get('source', '').strip() :
277- print(f'ERROR : function {fn[\"name\"]} has no source path', file=sys.stderr)
278- sys.exit(1)
279- print(f'Valid : {project[\"name\"]} ({len(functions)} function(s))')
280- " || {
261+ import tomllib, sys
262+ with open('eclexiaiser.toml', 'rb') as f:
263+ data = tomllib.load(f)
264+ project = data.get('project', {})
265+ if not project.get('name', '').strip():
266+ print('ERROR: project.name is required', file=sys.stderr)
267+ sys.exit(1)
268+ functions = data.get('functions', [])
269+ if not functions:
270+ print('ERROR: at least one [[functions]] entry is required', file=sys.stderr)
271+ sys.exit(1)
272+ for fn in functions:
273+ if not fn.get('name', '').strip():
274+ print('ERROR: function name cannot be empty', file=sys.stderr)
275+ sys.exit(1)
276+ if not fn.get('source', '').strip():
277+ print(f'ERROR: function {fn[\"name\"]} has no source path', file=sys.stderr)
278+ sys.exit(1)
279+ print(f'Valid: {project[\"name\"]} ({len(functions)} function(s))')
280+ " || {
281281 echo "::error file=eclexiaiser.toml::Invalid eclexiaiser.toml — see step output for details"
282282 exit 1
283283 }
0 commit comments