KotlinIsland / KotlinIsland/basedmypy

ban writing to baseline if there's new errors unless a new strictness flag has been enabled

Open
#108 1 comment 0 reactions 0 assignees View on GitHub
basedline feature p-2
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

as i understand there are two reasons you'd want to rewrite the baseline:
- you've just fixed errors that were baselined and want to remove them so they can't silently reappear later (#106, #107)
- you've just added a new strictness flag and want to add all of the errors it caused to the baseline

but other than that, you should NEVER want to write to the baseline if you've caused new errors with your changes. so basedmypy should prevent you from doing it (maybe with a `--force` flag if you want to ignore this restriction and write to it anyway)

the baseline file could also contain the strictness flags it was run with, so that way it can detect when you've added a new one, then allow writing the new errors

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start at the baseline-writing entry point and inspect how strictness flags and new errors are recorded; done means ordinary writes are blocked when changes add errors, while an explicit override or newly enabled strictness permits the intended update.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.