Skip to content

Commit

Permalink
Issue onosproject#8 new flag for appending to the skipped directory l…
Browse files Browse the repository at this point in the history
…ist for license checking (onosproject#9)
  • Loading branch information
damianoneill authored and Andrea-Campanella committed Jan 21, 2020
1 parent 778473b commit 9b53966
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions licensing/boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,18 @@
help="give verbose output regarding why a file does not pass",
action="store_true")

parser.add_argument(
"--skipped-dir",
default=[".git", "vendor", "node_modules", "dist"],
help="Add directories to skip during license check",
action="append")

args = parser.parse_args()

verbose_out = sys.stderr if args.verbose else open("/dev/null", "w")

skipped_dirs = args.skipped_dir

def get_refs():
refs = {}

Expand Down Expand Up @@ -157,9 +165,6 @@ def file_passes(filename, refs, regexs):
def file_extension(filename):
return os.path.splitext(filename)[1].split(".")[-1].lower()

# list of the directories to skip during license check
skipped_dirs = ['.git', "vendor", "node_modules", "dist"]

# list all the files contain 'DO NOT EDIT', but are not generated
skipped_ungenerated_files = ['build/licensing/boilerplate.py']

Expand Down

0 comments on commit 9b53966

Please sign in to comment.