MetOffice / MetOffice/Vernier

Make a decision regarding allowed region names

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
6
Forks
11
Avg merge
18h 7m
Merged PRs (30d)
1

Description

Currently it's hard to write a unit test for the region name as what's allowed depends entirely on the limitations (or seemingly lack of limitations) of `std::string`.

I've tried passing through super long region names, blank spaces, non-null-terminated strings, special characters etc. but it seems to be OK with all of them.

If we want some region to be not allowed, I think we will have to make assertions for it within the code or something similar that can easily be unit tested.

Reasons for not allowing certain things might be just be to make sure the output looks nice (e.g. isn't formatted weirdly because a region name is 100 characters, or has random gibberish due to non-null-terminated strings).

Contributor guide

Open the contributing guide

Research direction

Start by locating the code that accepts and formats region names and the existing unit tests; the issue does not name specific files or entry points. Review how names are currently handled, agree on which inputs should be allowed, and define tests that make the chosen policy verifiable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.