diff --git a/test/fixtures/linter/rules/NoDeprecatedApi/ui5.yaml b/test/fixtures/linter/rules/NoDeprecatedApi/ui5.yaml new file mode 100644 index 000000000..dd924281f --- /dev/null +++ b/test/fixtures/linter/rules/NoDeprecatedApi/ui5.yaml @@ -0,0 +1,11 @@ +specVersion: '3.0' +metadata: + name: com.ui5.troublesome.app +type: application +framework: + name: OpenUI5 + version: "1.121.0" + libraries: + - name: sap.m + - name: sap.ui.core + - name: sap.landvisz diff --git a/test/lib/linter/_linterHelper.ts b/test/lib/linter/_linterHelper.ts index 60d21dce0..9050b5385 100644 --- a/test/lib/linter/_linterHelper.ts +++ b/test/lib/linter/_linterHelper.ts @@ -70,8 +70,9 @@ export function createTestsForFixtures(fixturesPath: string) { if (!fileName.endsWith(".js") && !fileName.endsWith(".xml") && !fileName.endsWith(".json") && - !fileName.endsWith(".html")) { - // Ignore non-JavaScript, non-XML, non-JSON and non-HTML files + !fileName.endsWith(".html") && + !fileName.endsWith(".yaml")) { + // Ignore non-JavaScript, non-XML, non-JSON, non-HTML and non-YAML files continue; } let testName = fileName; diff --git a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md index db9f30fc8..9880d65ff 100644 --- a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md +++ b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md @@ -1222,3 +1222,27 @@ Generated by [AVA](https://avajs.dev). warningCount: 0, }, ] + +## General: ui5.yaml + +> Snapshot 1 + + [ + { + coverageInfo: [], + errorCount: 1, + fatalErrorCount: 0, + filePath: 'ui5.yaml', + messages: [ + { + column: 7, + fatal: undefined, + line: 11, + message: 'Use of deprecated library \'sap.landvisz\'', + ruleId: 'ui5-linter-no-deprecated-api', + severity: 2, + }, + ], + warningCount: 0, + }, + ] diff --git a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap index 11120fef8..f754d7acf 100644 Binary files a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap and b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap differ