Skip to content

feat: update terminology from RFC2119 to BCP14#257

Open
1456055067 wants to merge 2 commits intoietf-tools:v3from
1456055067:fix/bcp14-terminology
Open

feat: update terminology from RFC2119 to BCP14#257
1456055067 wants to merge 2 commits intoietf-tools:v3from
1456055067:fix/bcp14-terminology

Conversation

@1456055067
Copy link
Contributor

Summary

Updates all user-facing error messages and validation logic to reference BCP14 instead of RFC2119, as BCP14 encompasses both RFC 2119 and RFC 8174.

Changes Made

1. Message Updates

  • Changed all error/warning/comment messages from "RFC2119" to "BCP14"
  • Updated JSDoc comments to reference BCP14
  • Fixed grammar ("an RFC2119" → "a BCP14")

2. Enhanced Reference Checking

  • TXT documents: Already checked for RFC2119, RFC8174, and BCP14 references
  • XML documents: Now checks externalEntities for all three reference types (previously only checked RFC2119)

3. New Warning: PREFER_BCP14_REF

When a document uses RFC2119/RFC8174 keywords and references, but doesn't reference BCP14, the validator now warns:

"Consider referencing BCP14 instead of (or in addition to) RFC2119/RFC8174, as BCP14 encompasses both specifications."

This encourages best practices while not breaking existing documents.

4. Test Updates

  • Updated ~50 test expectations to match new message text
  • Added BCP14 reference field to test fixtures
  • Tests for documents already using BCP14 references pass without the new warning

Addresses Issue #210

Per rjsparks' comment, this PR tackles:
✅ Updating user-facing messages to reference BCP14
✅ Fixing code constructs that check references
✅ Warning when BCP14 reference is missing

Testing

All 50 keyword validation tests pass. The full test suite shows only pre-existing failures unrelated to these changes.

Fixes #210

Changes user-facing messages and validation logic to reference BCP14
instead of RFC2119, as BCP14 encompasses both RFC2119 and RFC8174.

Changes:
- Updated all error/warning messages to say "BCP14" instead of "RFC2119"
- Updated JSDoc comments to reference BCP14
- Fixed XML validation to check for RFC2119, RFC8174, or BCP14 references
- Added new warning (PREFER_BCP14_REF) when documents reference only
  RFC2119/RFC8174 without BCP14
- Updated all test expectations to match new message text

Fixes ietf-tools#210
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refer to BCP14 rather than RFC 2119

2 participants