Skip to content

Commit

Permalink
Modify check_file_type.py to pass the ci
Browse files Browse the repository at this point in the history
Signed-off-by: leonwanghui <[email protected]>
  • Loading branch information
leonwanghui committed Jul 14, 2020
1 parent 17bc8ec commit 30b5d66
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/lint/check_file_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"tokens",
# interface definition
"idl",
}
}

# List of file names allowed
ALLOW_FILE_NAME = {
Expand All @@ -96,7 +96,7 @@
".scalafmt.conf",
"Cargo.lock",
"with_the_same_user",
}
}

# List of specific files allowed in relpath to <proj_root>
ALLOW_SPECIFIC_FILE = {
Expand All @@ -108,6 +108,7 @@
# cargo config
"rust/runtime/tests/test_wasm32/.cargo/config",
"apps/sgx/.cargo/config",
"apps/wasm-standalone/wasm-graph/.cargo/config",
# html for demo purposes
"web/apps/browser/rpc_server.html",
# images are normally not allowed
Expand All @@ -118,7 +119,7 @@
"docs/_static/css/tvm_theme.css",
"docs/_static/img/tvm-logo-small.png",
"docs/_static/img/tvm-logo-square.png",
}
}


def filename_allowed(name):
Expand Down Expand Up @@ -159,7 +160,7 @@ def copyright_line(line):
if line.find("Copyright " + "(c)") != -1:
return True
if (line.find("Copyright") != -1 and
line.find(" by") != -1):
line.find(" by") != -1):
return True
return False

Expand Down Expand Up @@ -233,5 +234,6 @@ def main():

print("check_file_type.py: all checks passed..")


if __name__ == "__main__":
main()

0 comments on commit 30b5d66

Please sign in to comment.