From 578165004263f3d34893c566cbad2d08495900a1 Mon Sep 17 00:00:00 2001 From: Adrian Kunz Date: Wed, 17 Apr 2024 16:21:15 +0200 Subject: [PATCH] fix(scripts): Don't mess up FFX1012 --- ERROR_CODES.md | 4 ++-- scripts/error-codes.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ERROR_CODES.md b/ERROR_CODES.md index 5a8f48dd..b07b5b2b 100644 --- a/ERROR_CODES.md +++ b/ERROR_CODES.md @@ -181,7 +181,7 @@ show(new MyComponent()); // Wrong, should not be able to show a controller that ### 1012: `Cannot access private * '*' in class '*' annotated with '*'.` - Runtime: ✅ -- Annotation Processor: ❌aught by the compiler) +- Annotation Processor: ❌ (Caught by the compiler) This error is thrown when the framework tries to access a private field or method. @@ -685,4 +685,4 @@ This error is thrown if closing the file watcher fails. - Annotation Processor: ❌ This error is thrown if the framework fails to create a copy of an object because no duplicator has been registered for -the object's class. \ No newline at end of file +the object's class. diff --git a/scripts/error-codes.js b/scripts/error-codes.js index 121dceec..e4d25199 100644 --- a/scripts/error-codes.js +++ b/scripts/error-codes.js @@ -22,7 +22,7 @@ for (const property of errorCodesProperties.getKeys()) { await scanCodes('../framework/src/main/java', 'runtime'); await scanCodes('../annotation-processor/src/main/java', 'annotationProcessor'); -const newErrorCodesMd = errorCodesMd.replace(/^### (\d+).*(?:\r?\n)+- Runtime: ..?\r?\n- Annotation Processor: ..?/gm, (match, code) => { +const newErrorCodesMd = errorCodesMd.replace(/^### (\d+).*(?:\r?\n)+- Runtime: .\r?\n- Annotation Processor: ./gmu, (match, code) => { const error = errorCodes[code]; if (error) { error.matched = true;