diff --git a/.hooks/pre-commit b/.hooks/pre-commit index 67e8c5f83a7d..05390dc81760 100755 --- a/.hooks/pre-commit +++ b/.hooks/pre-commit @@ -21,4 +21,4 @@ if ! poetry run demisto-sdk >/dev/null 2>&1; then exit 1 fi -poetry run demisto-sdk pre-commit --staged-only --no-validate --no-docker \ No newline at end of file +poetry run demisto-sdk pre-commit --staged-only --mode=commit \ No newline at end of file diff --git a/.pre-commit-config_template.yaml b/.pre-commit-config_template.yaml index 154403df5b23..0f30677f5253 100644 --- a/.pre-commit-config_template.yaml +++ b/.pre-commit-config_template.yaml @@ -70,6 +70,8 @@ repos: config_file_arg: arg_name: --rcfile file_name: .pylintrc + skip:commit: true + - id: pytest-in-docker name: pytest-in-docker description: Run pytest on the code in content packs @@ -94,6 +96,8 @@ repos: - --files copy_files: - Tests/scripts/dev_envs/pytest/conftest.py + skip:commit: true + - id: pwsh-test-in-docker name: pwsh-test-in-docker description: Run powershell tests @@ -133,12 +137,15 @@ repos: entry: ./Tests/scripts/is_file_up_to_date.sh .circleci/config.yml "" false language: script pass_filenames: false + skip:commit: true - id: is-gitlab-changed name: is-gitlab-changed description: Checks if gitlab files are changed, and checkout to current if it is. entry: ./Tests/scripts/is_file_up_to_date.sh .gitlab "" false language: script pass_filenames: false + skip:commit: true + - id: validate name: validate description: validate content @@ -148,6 +155,8 @@ repos: pass_filenames: false language: system require_serial: true + skip:commit: true + - id: format name: format description: Format non-code files, to comply with XSOAR standards. diff --git a/Packs/Base/Scripts/CommonServerPython/test_data/__init__.py b/Packs/Base/Scripts/CommonServerPython/test_data/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/Packs/Mimecast/Integrations/MimecastEventCollector/test_data/__init__.py b/Packs/Mimecast/Integrations/MimecastEventCollector/test_data/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/Packs/Netcraft_V2/Integrations/Netcraft/test_data/__init__.py b/Packs/Netcraft_V2/Integrations/Netcraft/test_data/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/Tests/scripts/script_runner.py b/Tests/scripts/script_runner.py index 539481ae2040..98f6e464f083 100755 --- a/Tests/scripts/script_runner.py +++ b/Tests/scripts/script_runner.py @@ -16,8 +16,10 @@ def run_script(args, files): return 1 except subprocess.CalledProcessError as e: print("Error: {e}".format(e=e)) # noqa: T201,UP032 + return 1 except Exception as e: print("An error occurred: {e}".format(e=e)) # noqa: T201,UP032 + return 1 return 0