| 1 |
@REM ------------------------------------------------------------------------------ |
| 2 |
@REM Copyright (C) Intel Corporation |
| 3 |
@REM |
| 4 |
@REM SPDX-License-Identifier: MIT |
| 5 |
@REM ------------------------------------------------------------------------------ |
| 6 |
@REM Check code for issues. |
| 7 |
|
| 8 |
@ECHO off |
| 9 |
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION |
| 10 |
|
| 11 |
@REM Set project folder |
| 12 |
FOR /D %%i IN ("%~dp0\..") DO ( |
| 13 |
SET PROJ_DIR=%%~fi |
| 14 |
) |
| 15 |
|
| 16 |
@REM Set script folder |
| 17 |
FOR /D %%i IN ("%~dp0") DO ( |
| 18 |
SET SCRIPT_DIR=%%~fi |
| 19 |
) |
| 20 |
|
| 21 |
PUSHD %PROJ_DIR% |
| 22 |
echo Check commit-msg |
| 23 |
pre-commit run --hook-stage manual gitlint-ci || EXIT /b 1 |
| 24 |
|
| 25 |
echo Check commit |
| 26 |
pre-commit run --all-files || EXIT /b 1 |
| 27 |
POPD |
| 28 |
|
| 29 |
ENDLOCAL |