blob: 55ffedb9289f7b68001bb207463cc90e1e426bff [file] [log] [blame]
Joey Armstrong04cdd9f2023-06-09 15:18:23 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong9fadcbe2024-01-17 19:00:37 -05003# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong04cdd9f2023-06-09 15:18:23 -04004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# -----------------------------------------------------------------------
17
Joey Armstronga5278142023-06-28 16:56:54 -040018<<<<<<< HEAD
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040019.PHONY: lint-license-vst
20
21## -----------------------------------------------------------------------
22## -----------------------------------------------------------------------
23lint : lint-license-vst
Joey Armstronga5278142023-06-28 16:56:54 -040024=======
25.PHONY: lint-license
26
27## -----------------------------------------------------------------------
28## -----------------------------------------------------------------------
29lint : lint-license
30>>>>>>> dc6caae ([VOL-5064] - Build and deploy voltha-system-tests)
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040031
32lint-license-gargs += --recursive
33
34# ignore: png, xlsx
35# will utf8 be excluded(?)
36lint-license-gargs += --binary-files=without-match
37lint-license-gargs += --files-without-match
38
39# [TODO] license checking accepts either Copy or Apache.
40# [TODO] At least Copyright should be required (both?)
41lint-license-gargs += --extended-regexp
42lint-license-gargs += -e 'Copyright[[:space:]]+[[:digit:]]{4}'
43lint-license-gargs += -e 'Apache License'
44
45# [TODO] --strict, --strict-dates
46
47# TODO: Normalize into .venv for consistent filtering across projects.
48lint-license-gargs += --exclude-dir='.git'
Joey Armstronga5278142023-06-28 16:56:54 -040049<<<<<<< HEAD
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040050lint-license-gargs += --exclude-dir='vst_venv'
Joey Armstronga5278142023-06-28 16:56:54 -040051=======
52lint-license-gargs += --exclude-dir='$(venv-name)'
53>>>>>>> dc6caae ([VOL-5064] - Build and deploy voltha-system-tests)
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040054lint-license-gargs += --exclude-dir='flog'
55
56lint-license-gargs += --exclude='*.json'
57lint-license-gargs += --exclude='*.md'
58lint-license-gargs += --exclude='*.pyc'
59lint-license-gargs += --exclude='*.xml'
60
61# [FILE(s)]
62lint-license-gargs += --exclude='VERSION'
63
64# [GIT]
65# lint-license-gargs += --exclude='.gitignore'
66# lint-license-gargs += --exclude='.gitreview'
67lint-license-gargs += --exclude='\.*'
68
69# [PYTHON]
70lint-license-gargs += --exclude='requirements.txt'
71
72# [WIP]
73lint-license-gargs += --exclude='patch'
74
75## -----------------------------------------------------------------------
76## -----------------------------------------------------------------------
77lint-license-new:
78 grep $(lint-license-gargs) $(dot)
79
80## -----------------------------------------------------------------------
81## Jenkins job checking logic.
82## -----------------------------------------------------------------------
Joey Armstronga5278142023-06-28 16:56:54 -040083<<<<<<< HEAD
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040084lint-license-vst:
Joey Armstronga5278142023-06-28 16:56:54 -040085=======
86lint-license:
87>>>>>>> dc6caae ([VOL-5064] - Build and deploy voltha-system-tests)
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040088 $(MAKEDIR)/lint/license/license-check.sh
89
90## -----------------------------------------------------------------------
91## -----------------------------------------------------------------------
92help::
93 @echo " lint-license Verify sources contain a license block."
94 @echo " lint-license-new Grep driven replacement logic."
95
96# [EOF]