Skip to content

Add copyright header to all tests #4859

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

Merged
merged 1 commit into from
Aug 10, 2017

Conversation

geky
Copy link
Contributor

@geky geky commented Aug 4, 2017

Short story short: Make @0xc0170 happy : )

Short story long: At some point, some test was introduced without a copyright header, and through the test templates being copy-pasted, has proliferated the mbed OS codebase.

Now, every time someone contributes a test, they get asked to add the copyright header. Since most of our current tests lack this header, it can be a bit disengaging.

for n in $(grep -L Copyright $(find -regex '.*TESTS.*main.cpp')) ; do vim $n +'0r!sed -n "1,/\*\//{s/(c) [0-9-]*/(c) '$(date +%Y)'/;p}" mbed.h' +wq ; done

@Nodraak
Copy link
Contributor

Nodraak commented Aug 5, 2017

Header says Copyright (c) 2006-2013 ARM Limited, should not this be 2017?

PS: your vim command is awesome!

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 6, 2017

/morph test

1 similar comment
@studavekar
Copy link
Contributor

/morph test

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just that year might be 2017 as most of these tests were touched recently.

Very nice script, and this is good to have ! 👍

@geky geky force-pushed the tests-copyrights branch from 8bf2a26 to 4cad764 Compare August 7, 2017 17:02
@geky geky removed the needs: work label Aug 7, 2017
@geky
Copy link
Contributor Author

geky commented Aug 7, 2017

Ah thanks for pointing that out! Now that we're in sed changing the date is easy. Script updated 👍

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 8, 2017

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented Aug 8, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 961

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants