Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds 117 new law names to
data/law-names.jsonby automatically matching missing law names from HTML generation warnings against the SFS document database.Changes
data/law-names.json(236 → 353 entries, +50%)scripts/find_missing_law_names.pyto search for matching lawsscripts/add_law_names.pyto filter and select best matches.gitignoreto exclude generated log filesImpact
How it works
The matching algorithm:
Examples of added laws
brottsdatalagen→ Lag (2018:1696) om Skatteverkets behandling av personuppgifter inom brottsdatadjurskyddsförordningen→ Djurskyddsförordning (2019:66)budgetlagen→ Budgetlag (2011:203)patientsäkerhetslagen→ Patientsäkerhetslag (2010:659)socialförsäkringsbalken→ Socialförsäkringsbalk (2010:110)Test plan
Files changed
data/law-names.json- Added 117 new law entriesscripts/find_missing_law_names.py- New script for finding matching lawsscripts/add_law_names.py- New script for filtering and selecting best matches.gitignore- Exclude generated log files🤖 Generated with Claude Code