From 777deeba58d0a761d1c8e4be58f0c37fa6849f64 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Thu, 22 Jun 2023 13:43:59 -0400 Subject: [PATCH 1/2] fix: restore missing error actions --- messages/sdr.md | 4 ++-- src/resolve/adapters/matchingContentSourceAdapter.ts | 5 +---- test/resolve/adapters/matchingContentSourceAdapter.test.ts | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/messages/sdr.md b/messages/sdr.md index 1e5f92a86b..9618c8bbd5 100644 --- a/messages/sdr.md +++ b/messages/sdr.md @@ -54,11 +54,11 @@ No child types found in registry for %s (reading %s at %s) Metadata xml file %s is forceignored but is required for %s. -# error_no_source_ignore +# noSourceIgnore %s metadata types require source files, but %s is forceignored. -# error_no_source_ignore.actions +# noSourceIgnore.actions - Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending “\*” to your existing .forceignore entry. diff --git a/src/resolve/adapters/matchingContentSourceAdapter.ts b/src/resolve/adapters/matchingContentSourceAdapter.ts index e20d5eac12..794c7162e4 100644 --- a/src/resolve/adapters/matchingContentSourceAdapter.ts +++ b/src/resolve/adapters/matchingContentSourceAdapter.ts @@ -54,10 +54,7 @@ export class MatchingContentSourceAdapter extends BaseSourceAdapter { 'ExpectedSourceFilesError' ); } else if (this.forceIgnore.denies(sourcePath)) { - throw new SfError( - messages.getMessage('error_no_source_ignore', [this.type.name, sourcePath]), - 'UnexpectedForceIgnore' - ); + throw messages.createError('noSourceIgnore', [this.type.name, sourcePath]); } component.content = sourcePath; diff --git a/test/resolve/adapters/matchingContentSourceAdapter.test.ts b/test/resolve/adapters/matchingContentSourceAdapter.test.ts index f986d41be4..3eeb250950 100644 --- a/test/resolve/adapters/matchingContentSourceAdapter.test.ts +++ b/test/resolve/adapters/matchingContentSourceAdapter.test.ts @@ -65,7 +65,7 @@ describe('MatchingContentSourceAdapter', () => { assert.throws( () => adapter.getComponent(path), SfError, - messages.getMessage('error_no_source_ignore', [type.name, path]) + messages.createError('noSourceIgnore', [type.name, path]).message ); testUtil.restore(); }); From 381e04eb1a9a9267fcfd33e5304444beb7978ed8 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Thu, 22 Jun 2023 13:46:53 -0400 Subject: [PATCH 2/2] docs: include url --- messages/sdr.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/messages/sdr.md b/messages/sdr.md index 9618c8bbd5..5a618a6e28 100644 --- a/messages/sdr.md +++ b/messages/sdr.md @@ -62,6 +62,8 @@ Metadata xml file %s is forceignored but is required for %s. - Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending “\*” to your existing .forceignore entry. +See for examples + # error_path_not_found %s: File or folder not found