Skip to content

Add (opinionated) warnings for keywords #396

@gkreitz

Description

@gkreitz

Keywords are currently very underspecified in the problem standard. To help problem setters, and the community, it would make sense to me if problemtools was a bit opinionated in keyword usage (obviously, never giving an error, but nudging via warnings).

Firstly, we should probably add the same rule we're moving to in Kattis: keywords should only consist of lowercase letters, numbers, and hyphens. This will catch a number of errors and inconsistencies that we've seen in problem packages, with keywords such as "ad", "hoc", or "combinatorics," (with a trailing comma in the keyword).

Secondly, I'm toying with the idea of creating a list of "recommended" keywords, and nudging toward their usage. There are concepts that can be written in multiple ways ("bfs" vs "breadth-first-search", "maths" vs. "math"), and I think it would be useful to nudge all problems in one direction. One potential implementation would be to attempt to maintain a list of "well-known" keywords, and nudge towards those. Obviously, that list will never be complete - my hope would be that people would contribute things they feel are missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions