mirror of
https://github.com/intel/compute-runtime.git
synced 2025-06-28 17:58:30 +08:00

This wraps around commands used to format code and exposes them as single build system target: 'lint'. Change-Id: Ide88b8f080582221b1832be06fd2fd0f2cd44ab4 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
16 lines
399 B
Bash
Executable File
16 lines
399 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright (C) 2018 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
converter=$(dirname $(readlink -f $0))/set_copyright.py
|
|
|
|
if [ "${1:-STAGED}" = "HEAD" ]; then
|
|
git diff-tree --no-commit-id --name-only -r HEAD | xargs -n 1 python $converter
|
|
else
|
|
git diff --cached --name-only | xargs -n 1 python $converter
|
|
git diff --name-only | xargs -n 1 echo "Not scanned: "
|
|
fi
|