INNER CODE UNIT · Python

file_extension

kubernetes-csi/csi-driver-nfs · hack/boilerplate/boilerplate.py:132

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',
                'repo-infra/verify/boilerplate/test', '.glide']

def normalize_files(files):
    newfiles = []
    for pathname in files:
        if any(x in pathname for x in skipped_dirs):
            continue
        newfiles.append(pathname)
    return newfiles

def get_files(extensions):
    files = []
    if len(args.filenames) > 0:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…