From 5c547103dc3611cbe9a6e78c2d73d6512027d0e9 Mon Sep 17 00:00:00 2001 From: upgrader Date: Thu, 14 Sep 2023 18:15:19 +0300 Subject: [PATCH 1/4] SDK-2568 add evaluator configuration file docs --- .../evaluator-configuration-file.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md new file mode 100644 index 00000000000..92d1db9078f --- /dev/null +++ b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md @@ -0,0 +1,44 @@ +--- +title: Evaluator configuration file +description: Reference information for evaluator configuration file. +template: howto-guide-template +--- + +The configuration file allows to configure evaluator tool for specific project. + +## Problem description + +The built-in evaluator configuration is not enough for some projects. For example some errors are not fixable and should be ignored. +Need to provide the way to configure evaluator checkers on project level. + +## Evaluator configuration + +To configure the evaluator need to place `tooling.yml` in the project root directory. + +```yaml +# tooling.yml + +evaluator: + # evaluator options + ... + +``` + +## Ignoring checkers errors + +To ignore errors need to specify regular expressions in `ignoreErrors` section in configuration file. Each error message that matches these regular expressions will be ignored by evaluator. +You can specify rules both for some specific checkers or globally for all of them. + +```yaml +# tooling.yml + +evaluator: + ignoreErrors: + # generic error regexp + - '#SprykerSdkTest\\InvalidProject\\MultidimensionalArray\\Application1\\ApplicationDependencyProvider#' + # error regexp for some specific checker + - messages: + - '#deploy.*\.yml#' + - '#php\.7\.4#' + checker: PHP_VERSION_CHECKER +``` \ No newline at end of file From 29f0383f33a13f6db955460e8b53b69d5cb5454d Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Wed, 20 Sep 2023 11:04:24 +0300 Subject: [PATCH 2/4] rename --- .../ignore-evaluation-rules.md | 37 ++++++++++++++++ .../evaluator-configuration-file.md | 44 ------------------- 2 files changed, 37 insertions(+), 44 deletions(-) create mode 100644 docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-rules.md delete mode 100644 docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-rules.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-rules.md new file mode 100644 index 00000000000..e79cde6313c --- /dev/null +++ b/docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-rules.md @@ -0,0 +1,37 @@ +--- +title: Ignore evaluation rules +description: Reference information for evaluator configuration file. +template: howto-guide-template +--- + +In some cases, the evaluator's rules may cause false positive errors. Then you can configure the evaluator to ignore some errors. + +1. To configure the evaluator, add `tooling.yml` to the project's root directory. + +```yaml +# tooling.yml + +evaluator: + # evaluator options + ... + +``` + +2. In `ignoreErrors` section, add the errors to ignore using regular expressions. + You can configure specific or multiple errors to be ignored. + +```yaml +# tooling.yml + +evaluator: + ignoreErrors: + # generic error regexp + - '#SprykerSdkTest\\InvalidProject\\MultidimensionalArray\\Application1\\ApplicationDependencyProvider#' + # error regexp for some specific checker + - messages: + - '#deploy.*\.yml#' + - '#php\.7\.4#' + checker: PHP_VERSION_CHECKER +``` + +The error message matching the regular expressions should now be ignored. diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md deleted file mode 100644 index 92d1db9078f..00000000000 --- a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Evaluator configuration file -description: Reference information for evaluator configuration file. -template: howto-guide-template ---- - -The configuration file allows to configure evaluator tool for specific project. - -## Problem description - -The built-in evaluator configuration is not enough for some projects. For example some errors are not fixable and should be ignored. -Need to provide the way to configure evaluator checkers on project level. - -## Evaluator configuration - -To configure the evaluator need to place `tooling.yml` in the project root directory. - -```yaml -# tooling.yml - -evaluator: - # evaluator options - ... - -``` - -## Ignoring checkers errors - -To ignore errors need to specify regular expressions in `ignoreErrors` section in configuration file. Each error message that matches these regular expressions will be ignored by evaluator. -You can specify rules both for some specific checkers or globally for all of them. - -```yaml -# tooling.yml - -evaluator: - ignoreErrors: - # generic error regexp - - '#SprykerSdkTest\\InvalidProject\\MultidimensionalArray\\Application1\\ApplicationDependencyProvider#' - # error regexp for some specific checker - - messages: - - '#deploy.*\.yml#' - - '#php\.7\.4#' - checker: PHP_VERSION_CHECKER -``` \ No newline at end of file From 9327d96d32a005686ec5da2e92f97a68d12829b1 Mon Sep 17 00:00:00 2001 From: upgrader Date: Wed, 20 Sep 2023 11:56:46 +0300 Subject: [PATCH 3/4] SDK-2568 update evaluator configuration docs --- .../upgradability-guidelines/evaluator-configuration-file.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md index 92d1db9078f..edda156e9e4 100644 --- a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md +++ b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/evaluator-configuration-file.md @@ -26,8 +26,8 @@ evaluator: ## Ignoring checkers errors -To ignore errors need to specify regular expressions in `ignoreErrors` section in configuration file. Each error message that matches these regular expressions will be ignored by evaluator. -You can specify rules both for some specific checkers or globally for all of them. +To ignore errors need to specify regular expressions in `ignoreErrors` section in configuration file. Each error message that matches them will be ignored by evaluator. +You can specify regular expressions both for some specific checkers or globally for all of them. ```yaml # tooling.yml From 8c5b4ee5960ec46d29102636a48ba31aa1200822 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Wed, 20 Sep 2023 15:45:04 +0300 Subject: [PATCH 4/4] tw-reivew --- _data/sidebars/scos_dev_sidebar.yml | 2 ++ ...ation-rules.md => ignore-evaluation-errors.md} | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) rename docs/scos/dev/guidelines/keeping-a-project-upgradable/{ignore-evaluation-rules.md => ignore-evaluation-errors.md} (62%) diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index bc6b78ab248..de9bd5ac6a6 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -4805,6 +4805,8 @@ entries: url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-security-checker.html - title: Single plugin argument url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/single-plugin-argument.html + - title: Ignore evaluation errors + url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-errors.html - title: Performance guidelines url: /docs/scos/dev/guidelines/performance-guidelines/performance-guidelines.html nested: diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-rules.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-errors.md similarity index 62% rename from docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-rules.md rename to docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-errors.md index e79cde6313c..8db440ffc20 100644 --- a/docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-rules.md +++ b/docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-errors.md @@ -1,15 +1,14 @@ --- -title: Ignore evaluation rules +title: Ignore evaluation errors description: Reference information for evaluator configuration file. template: howto-guide-template --- In some cases, the evaluator's rules may cause false positive errors. Then you can configure the evaluator to ignore some errors. -1. To configure the evaluator, add `tooling.yml` to the project's root directory. +1. To configure the evaluator to ignore errors, add `tooling.yml` to the project's root directory. ```yaml -# tooling.yml evaluator: # evaluator options @@ -17,17 +16,17 @@ evaluator: ``` -2. In `ignoreErrors` section, add the errors to ignore using regular expressions. - You can configure specific or multiple errors to be ignored. +2. In the `ignoreErrors` section, add the errors to ignore using regular expressions. + You can specify errors to ignore globally or per specific checker. +**tooling.yml** ```yaml -# tooling.yml evaluator: ignoreErrors: - # generic error regexp + # global error ignore regexp - '#SprykerSdkTest\\InvalidProject\\MultidimensionalArray\\Application1\\ApplicationDependencyProvider#' - # error regexp for some specific checker + # error ignore regexp for a defined checker - messages: - '#deploy.*\.yml#' - '#php\.7\.4#'