Skip to content

Commit

Permalink
fix: Detect root files according to UI5 configuration schema
Browse files Browse the repository at this point in the history
  • Loading branch information
maxreichmann committed Mar 21, 2024
1 parent 580177d commit 613a442
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/detectors/typeChecker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export class TsProjectDetector extends ProjectBasedDetector {
({source, messages} = await lintManifest(resourcePath, resourceContent));
}

Check failure on line 120 in src/detectors/typeChecker/index.ts

View workflow job for this annotation

GitHub Actions / General checks, tests and coverage reporting

Closing curly brace does not appear on the same line as the subsequent block

Check failure on line 120 in src/detectors/typeChecker/index.ts

View workflow job for this annotation

GitHub Actions / General checks, tests and coverage reporting

Trailing spaces not allowed
else if (resourcePath.endsWith(".yaml")) {
// TODO: account for all ui5.yaml schemas
resourcePath = resourcePath.replace(/\.yaml$/, ".js");
const resourceContent = await resource.getString();
console.log(resourceContent);

Check failure on line 125 in src/detectors/typeChecker/index.ts

View workflow job for this annotation

GitHub Actions / General checks, tests and coverage reporting

Unexpected console statement
Expand Down Expand Up @@ -173,7 +174,7 @@ export class TsProjectDetector extends ProjectBasedDetector {
const allResources = await reader.byGlob("/resources/**/" + fileTypes);
const allTestResources = await reader.byGlob("/test-resources/**/" + fileTypes);

Check failure on line 176 in src/detectors/typeChecker/index.ts

View workflow job for this annotation

GitHub Actions / General checks, tests and coverage reporting

Trailing spaces not allowed
const rootFileTypes = "ui5.yaml"; // future: extend with other root files (e.g. 'ui5-XXX.yaml')
const rootFileTypes = "{ui5.yaml,*-ui5.yaml,*.ui5.yaml,ui5-deploy.yaml,ui5-dist.yaml,ui5-local.yaml}"; // future: extend with other root files (e.g. 'ui5-XXX.yaml')

Check failure on line 177 in src/detectors/typeChecker/index.ts

View workflow job for this annotation

GitHub Actions / General checks, tests and coverage reporting

This line has a length of 172. Maximum allowed is 120
// currently: only support for 'ui5.yaml'

Check failure on line 178 in src/detectors/typeChecker/index.ts

View workflow job for this annotation

GitHub Actions / General checks, tests and coverage reporting

Expected indentation of 2 tabs but found 3
const rootDirectoryResources = await rootReader.byGlob("/" + rootFileTypes);
globEnd();
Expand Down

0 comments on commit 613a442

Please sign in to comment.