mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-08-01 16:30:02 +00:00
feat(config, validation): enhance config validation with strict mode and update example checks
- Added a `--strict` option to `validate_config.py` to fail on "Unknown section" messages, aimed at CI validation of example configs. - Updated GitHub Actions workflow to validate shipped example configs against the canonical section list using the new strict mode. - Expanded the `CANONICAL_NON_COMMAND_SECTIONS` in `config_validation.py` to include additional sections for improved validation accuracy. - Introduced a regression test to ensure example configs do not trigger unknown section warnings, maintaining consistency with the canonical list.
This commit is contained in:
@@ -75,6 +75,16 @@ jobs:
|
||||
- name: Log injection check — fail on new unsanitized logger calls
|
||||
run: python scripts/check_log_injection.py
|
||||
|
||||
- name: Config validation — fail on unrecognized sections in shipped configs
|
||||
run: |
|
||||
set -e
|
||||
for f in config.ini.example config.ini.minimal-example config.ini.quickstart config.min.ini config-pymc.ini; do
|
||||
if [ -f "$f" ]; then
|
||||
echo "Validating $f"
|
||||
python validate_config.py --config "$f" --strict
|
||||
fi
|
||||
done
|
||||
|
||||
typecheck:
|
||||
name: Type check (mypy)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user