Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
49a4dda7
Commit
49a4dda7
authored
7 years ago
by
Sebastian Meiling
Browse files
Options
Downloads
Patches
Plain Diff
tools: ignore vendor files on whitespace check
parent
5c65711f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dist/tools/whitespacecheck/check.sh
+4
-2
4 additions, 2 deletions
dist/tools/whitespacecheck/check.sh
with
4 additions
and
2 deletions
dist/tools/whitespacecheck/check.sh
+
4
−
2
View file @
49a4dda7
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
# General Public License v2.1. See the file LICENSE in the top level
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
# directory for more details.
NOVENDOR
=
":!*/include/vendor/*"
# If no branch but an option is given, unset BRANCH.
# If no branch but an option is given, unset BRANCH.
# Otherwise, consume this parameter.
# Otherwise, consume this parameter.
BRANCH
=
"
${
1
}
"
BRANCH
=
"
${
1
}
"
...
@@ -28,14 +30,14 @@ if [ -z "${BRANCH}" ]; then
...
@@ -28,14 +30,14 @@ if [ -z "${BRANCH}" ]; then
fi
fi
git
-c
core.whitespace
=
"tab-in-indent,tabwidth=4"
\
git
-c
core.whitespace
=
"tab-in-indent,tabwidth=4"
\
diff
--check
$(
git merge-base
${
BRANCH
}
HEAD
)
--
*
.[ch]
diff
--check
$(
git merge-base
${
BRANCH
}
HEAD
)
--
*
.[ch]
${
NOVENDOR
}
RESULT
=
$?
RESULT
=
$?
# Git regards any trailing white space except `\n` as an error so `\r` is
# Git regards any trailing white space except `\n` as an error so `\r` is
# checked here, too
# checked here, too
git
-c
core.whitespace
=
"trailing-space"
\
git
-c
core.whitespace
=
"trailing-space"
\
diff
--check
$(
git merge-base
${
BRANCH
}
HEAD
)
diff
--check
$(
git merge-base
${
BRANCH
}
HEAD
)
--
.
${
NOVENDOR
}
if
[
$?
-ne
0
]
||
[
$RESULT
-ne
0
]
if
[
$?
-ne
0
]
||
[
$RESULT
-ne
0
]
then
then
echo
"ERROR: This change introduces new whitespace errors"
echo
"ERROR: This change introduces new whitespace errors"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment