-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a script to check for line endings (valid UNIX ending) #2544
Conversation
Yet again the build fail is due to Travis being flaky , kindly re-run the build again :) |
Actually it fails because there are trailing whitespaces in your script. Please remove them ;) |
(It's flaky when some random board fails. The static tests are quite stable) Speaking of: could you add your script to them (add a call to your script to |
Ok , I will have a look at it and make sure that the check applies only to new files :) |
2a6ab40
to
db97416
Compare
@authmillenon : I have added a new script which checks only for the newly added files and added a call to it in build_and_run.sh. However I do not have the permission to modify build_and_run.sh ( and that is why the static case fails ) . So have a look at it . |
./dist/tools/endingcheck/check.sh master --diff-filter=AC | ||
RESULT=$(set_result $? $RESULT) | ||
|
||
./dist/tools/endingcheck/check.sh riot/master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One call of your script with riot/master
(the current master at RIOT-OS/RIOT) and --diff-filter=MA
(only look at modified [M] and added [A] files) should suffice (source: http://git-scm.com/docs/git-diff).
What do you mean? You obviously modified it (see my comment above). So how do you come to the impression you don't have any permission to do so? 😕 |
That's because it is the reason build failed |
Ah... Your script is not executable. That's why Travis is saying the permissions were denied (because it has no permission to execute it). Git has an understanding of UNIX permission flags so you have to give your script execution permission: chmod +x ./dist/tools/endingcheck/check.sh |
(and than of course add this change to git ;) git add ./dist/tools/endingcheck/check.sh
git commit |
db97416
to
ea4b6da
Compare
Done , the changes and the build |
# | ||
|
||
BRANCH=${1} | ||
FILEREGEX='\.([sScHh]|cpp)$' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually include all files, when I think about it, not just source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are things like images which should be excluded from it.
Please squash only when the review is done, otherwise it can get a little bit confusing with bigger changes ;-) |
Ok , I'll keep that in mind from next time. So , can I squash now to change the file regex ? |
No, just mark the commits as squashable (I usually use a |
See #2546 for example |
@@ -45,6 +45,11 @@ then | |||
./dist/tools/externc/check.sh master | |||
RESULT=$(set_result $? $RESULT) | |||
|
|||
RESULT=$(set_result $? $RESULT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this duplicate line here?
-Created a bash script using grep to check for carriage return at line endings. -Works for modified and new files only (if choosen) -Modified build_and_run.sh to include the new check.sh and run it.
d12a498
to
41ad994
Compare
@OlegHahm : Done squashing. |
Adding a script to check for line endings (valid UNIX ending)
-Created a bash script using grep to check for carriage return at line endings.
-Fix for issue #2281.