Skip to content

Commit

Permalink
Ciac 11199/support new validate in validate content script (#37182)
Browse files Browse the repository at this point in the history
* test dockerimage

* test

* working new validate

* working new validate with git

* working

* fixes

* working validate

* working validate

* set DEMISTO_SDK_OFFLINE_ENV=false

* message

* read precommit results from file

* working with semi-parsing

* Working version - not tests

* output format fix

* unittests

* unittests

* unittests

* pre-commit

* redundant changes

* RN

* pack version

* unit test fix

* unit test fix

* committer

* new docker

* updated docker image

* Rename 1_40_0.md to 1_39_5.md

* Update ValidateContent_test.py

* fix unit tests

* Bump pack from version Base to 1.39.6.

* Fix unit test

* fix unit tests

* fix unit tests

* Update README.md

* PR fixes

* PR fixes

* TPB fix

* TPB fix

* TPB fix

* TPB remove

* no tests

---------

Co-authored-by: Content Bot <[email protected]>
  • Loading branch information
barryyosi-panw and Content Bot authored Jan 2, 2025
1 parent f63b484 commit 38ffaf9
Show file tree
Hide file tree
Showing 7 changed files with 844 additions and 684 deletions.
5 changes: 5 additions & 0 deletions Packs/Base/ReleaseNotes/1_39_7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#### Scripts

##### ValidateContent
Updated the script to utilize up-to-date validation logic from `demisto-sdk`.
22 changes: 11 additions & 11 deletions Packs/Base/Scripts/ValidateContent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ This automation script is used as part of the content validation that runs as pa
## Outputs

---

| **Path** | **Description** | **Type** |
| --- | --- | --- |
| --- | -- | --- |
| ValidationResult.Name| Name of validated item. | String |
| ValidationResult.Error | The validation error message. | String |
| ValidationResult.Line | The code line number in which the error was found in the lint. | String |

| ValidationResult.ErrorCode | The error code or the name of the linter that identified the issue. | String |

## Script Example

Expand All @@ -40,16 +39,17 @@ This automation script is used as part of the content validation that runs as pa
## Context Example

```
{
"ValidationResult": [
{
"Name": "MyScript",
"Error": "The docker image tag is not the latest numeric tag, please update it."
"Error": "{unterminated string literal (detected at line 166) [syntax]"
"Line": 165,
"Error Code/Linter": "mypy"
},
{
"Name": "MyScript",
"Error": "test for membership should be 'not in'",
"Line": "44"
"Error": "The following commands contain duplicated arguments:Command example-my-command, contains multiple appearances of the following arguments message.Please make sure to remove the duplications.",
"Error Code/Linter": "IN113"
}
]
}
Expand All @@ -59,7 +59,7 @@ This automation script is used as part of the content validation that runs as pa

### Validation Results

|Name|Error|Line|
|---|---|---|
| MyScript | The docker image tag is not the latest numeric tag, please update it. | |
| MyScript | test for membership should be 'not in' | 44 |
| Name | Error | Line | Error Code/Linter |
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|--------------------|
| MyScript | The following commands contain duplicated arguments: Command example-my-command, contains multiple appearances of the following arguments message. Please make sure to remove the duplications. | | IN113 |
| MyScript | unterminated string literal (detected at line 166) [syntax] | 166 | mypy |
Loading

0 comments on commit 38ffaf9

Please sign in to comment.