forked from SCST-project/scst
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from truenas/rebase_on_master
Rebase truenas-3.9.0-pre on master
- Loading branch information
Showing
34 changed files
with
138 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
scriptpath=${CHECKPATCH_PATH:-/lib/modules/$(uname -r)/build/scripts} | ||
|
||
ignore=( | ||
CONSTANT_COMPARISON | ||
LINUX_VERSION_CODE | ||
LONG_LINE | ||
LONG_LINE_COMMENT | ||
LONG_LINE_STRING | ||
RETURN_VOID | ||
SPDX_LICENSE_TAG | ||
SYMBOLIC_PERMS | ||
MISSING_SIGN_OFF | ||
EMAIL_SUBJECT | ||
UNKNOWN_COMMIT_ID | ||
NO_AUTHOR_SIGN_OFF | ||
COMMIT_LOG_USE_LINK | ||
BAD_REPORTED_BY_LINK | ||
FILE_PATH_CHANGES | ||
SPDX_LICENSE_TAG | ||
LINUX_VERSION_CODE | ||
CONSTANT_COMPARISON | ||
NEW_TYPEDEFS | ||
) | ||
../linux-kernel/scripts/checkpatch.pl -f --show-types --ignore="$(echo "${ignore[@]}" | sed 's/ /,/g')" $(list-source-files | grep -vE '^debian/|^fcst/linux-patches|patch$|pdf$|png$|^iscsi-scst/usr|^qla|^scripts/|^scstadmin/|^usr/|^www/') | sed 's/^#[0-9]*: FILE: \(.*\):/\1:1:/' | ||
ignore_str=${ignore[*]} | ||
|
||
${scriptpath}/checkpatch.pl --no-tree --show-types --strict --ignore="${ignore_str// /,}" $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
rootdir=$(readlink -f $(dirname $0)/..) | ||
scriptsdir=${rootdir}/scripts | ||
base_commit=${1:-master} | ||
|
||
commits=$(cd ${rootdir} && git log --pretty=format:"%h" ${base_commit}..HEAD) | ||
err=0 | ||
|
||
for commit in $commits; do | ||
echo "Running checkpatch for commit $commit" | ||
echo -e "========================================\n" | ||
|
||
(cd ${rootdir} && | ||
git format-patch -1 --stdout $commit | ${scriptsdir}/checkpatch -) || err=1 | ||
echo -e "\n" | ||
done | ||
|
||
exit $err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
rootdir=$(readlink -f $(dirname $0)/..) | ||
scriptsdir=${rootdir}/scripts | ||
base_commit=${1:-master} | ||
|
||
err=0 | ||
|
||
(cd ${rootdir} && git diff ${base_commit} | ${scriptsdir}/checkpatch -) || err=1 | ||
|
||
exit $err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
rootdir=$(readlink -f $(dirname $0)/..) | ||
scriptsdir=${rootdir}/scripts | ||
outputfile=checkpatch.out | ||
|
||
src_files=$(${scriptsdir}/list-source-files ${rootdir} | \ | ||
grep -vE '^debian/|^fcst/linux-patches|patch$|pdf$|png$|^iscsi-scst/usr|^qla|^scripts/|^scstadmin/|^usr/|^www/' | \ | ||
while read -r filename; do echo "${rootdir}/$filename"; done) | ||
${scriptsdir}/checkpatch -f $src_files 1> ${outputfile} || true | ||
errors=$(grep -c '^ERROR' "${outputfile}") | ||
warnings=$(grep -c '^WARNING' "${outputfile}") | ||
checks=$(grep -c '^CHECK' "${outputfile}") | ||
echo "${errors} errors / ${warnings} warnings / ${checks} checks." | ||
grep -E '^WARNING|^ERROR|^CHECK' "${outputfile}" | | ||
sort | | ||
sed 's/^CHECK:CAMELCASE: Avoid CamelCase:.*/CHECK:CAMELCASE Avoid CamelCase/' | | ||
uniq -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.