Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | 9fadcbe | 2024-01-17 19:00:37 -0500 | [diff] [blame] | 3 | # Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors |
Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 4 | # |
| 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 Armstrong | a527814 | 2023-06-28 16:56:54 -0400 | [diff] [blame^] | 18 | <<<<<<< HEAD |
Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 19 | .PHONY: lint-license-vst |
| 20 | |
| 21 | ## ----------------------------------------------------------------------- |
| 22 | ## ----------------------------------------------------------------------- |
| 23 | lint : lint-license-vst |
Joey Armstrong | a527814 | 2023-06-28 16:56:54 -0400 | [diff] [blame^] | 24 | ======= |
| 25 | .PHONY: lint-license |
| 26 | |
| 27 | ## ----------------------------------------------------------------------- |
| 28 | ## ----------------------------------------------------------------------- |
| 29 | lint : lint-license |
| 30 | >>>>>>> dc6caae ([VOL-5064] - Build and deploy voltha-system-tests) |
Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 31 | |
| 32 | lint-license-gargs += --recursive |
| 33 | |
| 34 | # ignore: png, xlsx |
| 35 | # will utf8 be excluded(?) |
| 36 | lint-license-gargs += --binary-files=without-match |
| 37 | lint-license-gargs += --files-without-match |
| 38 | |
| 39 | # [TODO] license checking accepts either Copy or Apache. |
| 40 | # [TODO] At least Copyright should be required (both?) |
| 41 | lint-license-gargs += --extended-regexp |
| 42 | lint-license-gargs += -e 'Copyright[[:space:]]+[[:digit:]]{4}' |
| 43 | lint-license-gargs += -e 'Apache License' |
| 44 | |
| 45 | # [TODO] --strict, --strict-dates |
| 46 | |
| 47 | # TODO: Normalize into .venv for consistent filtering across projects. |
| 48 | lint-license-gargs += --exclude-dir='.git' |
Joey Armstrong | a527814 | 2023-06-28 16:56:54 -0400 | [diff] [blame^] | 49 | <<<<<<< HEAD |
Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 50 | lint-license-gargs += --exclude-dir='vst_venv' |
Joey Armstrong | a527814 | 2023-06-28 16:56:54 -0400 | [diff] [blame^] | 51 | ======= |
| 52 | lint-license-gargs += --exclude-dir='$(venv-name)' |
| 53 | >>>>>>> dc6caae ([VOL-5064] - Build and deploy voltha-system-tests) |
Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 54 | lint-license-gargs += --exclude-dir='flog' |
| 55 | |
| 56 | lint-license-gargs += --exclude='*.json' |
| 57 | lint-license-gargs += --exclude='*.md' |
| 58 | lint-license-gargs += --exclude='*.pyc' |
| 59 | lint-license-gargs += --exclude='*.xml' |
| 60 | |
| 61 | # [FILE(s)] |
| 62 | lint-license-gargs += --exclude='VERSION' |
| 63 | |
| 64 | # [GIT] |
| 65 | # lint-license-gargs += --exclude='.gitignore' |
| 66 | # lint-license-gargs += --exclude='.gitreview' |
| 67 | lint-license-gargs += --exclude='\.*' |
| 68 | |
| 69 | # [PYTHON] |
| 70 | lint-license-gargs += --exclude='requirements.txt' |
| 71 | |
| 72 | # [WIP] |
| 73 | lint-license-gargs += --exclude='patch' |
| 74 | |
| 75 | ## ----------------------------------------------------------------------- |
| 76 | ## ----------------------------------------------------------------------- |
| 77 | lint-license-new: |
| 78 | grep $(lint-license-gargs) $(dot) |
| 79 | |
| 80 | ## ----------------------------------------------------------------------- |
| 81 | ## Jenkins job checking logic. |
| 82 | ## ----------------------------------------------------------------------- |
Joey Armstrong | a527814 | 2023-06-28 16:56:54 -0400 | [diff] [blame^] | 83 | <<<<<<< HEAD |
Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 84 | lint-license-vst: |
Joey Armstrong | a527814 | 2023-06-28 16:56:54 -0400 | [diff] [blame^] | 85 | ======= |
| 86 | lint-license: |
| 87 | >>>>>>> dc6caae ([VOL-5064] - Build and deploy voltha-system-tests) |
Joey Armstrong | 04cdd9f | 2023-06-09 15:18:23 -0400 | [diff] [blame] | 88 | $(MAKEDIR)/lint/license/license-check.sh |
| 89 | |
| 90 | ## ----------------------------------------------------------------------- |
| 91 | ## ----------------------------------------------------------------------- |
| 92 | help:: |
| 93 | @echo " lint-license Verify sources contain a license block." |
| 94 | @echo " lint-license-new Grep driven replacement logic." |
| 95 | |
| 96 | # [EOF] |