INNER CODE UNIT · Python

file_extension

kubernetes-retired/kube-batch · hack/boilerplate/boilerplate.py:147

def file_extension(filename):
    return os.path.splitext(filename)[1].split(".")[-1].lower()

skipped_dirs = ['Godeps', 'third_party', '_gopath', '_output', '.git', 'cluster/env.sh',
                "vendor", "test/e2e/generated/bindata.go", "hack/boilerplate/test",
                "pkg/kubectl/generated/bindata.go"]

# list all the files contain 'DO NOT EDIT', but are not generated
skipped_ungenerated_files = ['hack/lib/swagger.sh', 'hack/boilerplate/boilerplate.py']

def normalize_files(files):
    newfiles = []
    for pathname in files:
        if any(x in pathname for x in skipped_dirs):
            continue
        newfiles.append(pathname)
    for i, pathname in enumerate(newfiles):
        if not os.path.isabs(pathname):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…