mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Merge branch 'master' into release
Change-Id: I96a006b2f3f3ebf1039aa043720e520d0ca53664
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[submodule "third_party/ukey2"]
|
||||
path = third_party/ukey2
|
||||
url = sso://team/nearby-eng/ukey2
|
||||
url = https://github.com/google/ukey2
|
||||
branch = master
|
||||
[submodule "third_party/protobuf"]
|
||||
path = third_party/protobuf
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# How to Contribute
|
||||
|
||||
We'd love to accept your patches and contributions to this project. There are
|
||||
just a few small guidelines you need to follow.
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Contributions to this project must be accompanied by a Contributor License
|
||||
Agreement. You (or your employer) retain the copyright to your contribution;
|
||||
this simply gives us permission to use and redistribute your contributions as
|
||||
part of the project. Head over to <https://cla.developers.google.com/> to see
|
||||
your current agreements on file or to sign a new one.
|
||||
|
||||
You generally only need to submit a CLA once, so if you've already submitted one
|
||||
(even if it was for a different project), you probably don't need to do it
|
||||
again.
|
||||
|
||||
## Code reviews
|
||||
|
||||
All submissions, including submissions by project members, require review. We
|
||||
use GitHub pull requests for this purpose. Consult
|
||||
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
|
||||
information on using pull requests.
|
||||
|
||||
## Community Guidelines
|
||||
|
||||
This project follows [Google's Open Source Community
|
||||
Guidelines](https://opensource.google.com/conduct/).
|
||||
+11
-4
@@ -17,6 +17,7 @@
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
@@ -34,6 +35,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.""".split("\n")
|
||||
|
||||
headline_match=".*Copyright [0-9,\- ]+ Google.*"
|
||||
|
||||
MISSING = 0
|
||||
HEADLINE = 1
|
||||
PARTIAL = 2
|
||||
@@ -41,20 +44,24 @@ FULL = 3
|
||||
|
||||
def has_copyright(lines, max_lookup=3):
|
||||
pos = 0
|
||||
result = MISSING
|
||||
headline = re.compile(headline_match)
|
||||
for line in lines:
|
||||
pos += 1 # points to the next line
|
||||
if line.find(copy_header[0]) >= 0:
|
||||
if headline.match(line) != None:
|
||||
result = HEADLINE
|
||||
break
|
||||
if pos > max_lookup:
|
||||
return MISSING
|
||||
|
||||
result = HEADLINE
|
||||
return result
|
||||
|
||||
for line in copy_header[1:]:
|
||||
if pos >= len(lines):
|
||||
return result
|
||||
if lines[pos].find(line) < 0:
|
||||
return result
|
||||
else:
|
||||
result = PARTIAL
|
||||
pos += 1
|
||||
|
||||
return FULL
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule third_party/ukey2 updated: 2fc30c8894...4550c84830
Reference in New Issue
Block a user