From d69677f8ad3a9024f93d1d8d2002da0c2f22ec40 Mon Sep 17 00:00:00 2001 From: Marika Marszalkowski Date: Fri, 4 Oct 2024 10:04:23 +0200 Subject: [PATCH] update style guide --- STYLEGUIDE.md | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 8a4fb744..c6ab2dd2 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -1,11 +1,36 @@ -# Style Guide +# Style Guide -The SAP Cloud SDK for AI follows the style guide from the SAP Cloud SDK for JavaScript. +The SAP Cloud SDK for AI follows the style guide from the SAP Cloud SDK for JavaScript: -## Code +- [**SAP Cloud SDK code style guide**](https://github.com/SAP/cloud-sdk-js/blob/main/STYLEGUIDE.md) +- [**SAP Cloud SDK documentation style guide**](https://github.com/SAP/cloud-sdk/blob/main/STYLEGUIDE.md) -[SAP Cloud SDK code style guide](https://github.com/SAP/cloud-sdk-js/blob/main/STYLEGUIDE.md) +#### Table of Contents -## Documentation +- [Code Style Guide Rule Overrides](#code-style-guide-rule-overrides) + - [Tests](#tests) + - [Use .test in test file names](#use-test-in-test-file-names) -[SAP Cloud SDK documentation style guide](https://github.com/SAP/cloud-sdk/blob/main/STYLEGUIDE.md) +## Code Style Guide Rule Overrides + +The rules below differ from the SAP Cloud SDK for JavaScript. + +### Tests + +#### Use .test in test file names + +Use `.test` not `.spec` to differentiate test files. + +❌ Examples of **incorrect** code: + +```ts +/* Don't use .spec.ts */ +test - file.spec.ts; +``` + +✅ Examples of **correct** code: + +```ts +/* Use .test.ts */ +test - file.test.ts; +```