Add support for pre-commit hook/linting
.pre-commit-config.yaml
-----------------------
o Create initial config for pre-commit hook.
misc/*
o Basic inline cleanups courtesy of the pre-commit hook.
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: I6aa20216ade22b1a7406e8358864fb245842b713
diff --git a/makefiles/lint/groovy/install.mk b/makefiles/lint/groovy/install.mk
index 8449b74..13830bf 100644
--- a/makefiles/lint/groovy/install.mk
+++ b/makefiles/lint/groovy/install.mk
@@ -46,4 +46,3 @@
@echo ' lint-groovy-install Syntax check groovy sources'
# [EOF]
-
diff --git a/makefiles/lint/jjb.mk b/makefiles/lint/jjb.mk
index 9565363..cfc5eba 100644
--- a/makefiles/lint/jjb.mk
+++ b/makefiles/lint/jjb.mk
@@ -44,7 +44,7 @@
lint-jjb-args += jjb/# # JJB config sources (input)
lint-jjb-deps := $(null)
-lint-jjb-deps += $(venv-activate-script)
+lint-jjb-deps += $(venv-activate-script)
lint-jjb-deps += checkout-ci-management-sub-modules
lint-jjb: $(lint-jjb-deps)
$(activate) && { jenkins-jobs $(lint-jjb-args); }
diff --git a/makefiles/lint/json.mk b/makefiles/lint/json.mk
index 4c63f88..9d0088f 100644
--- a/makefiles/lint/json.mk
+++ b/makefiles/lint/json.mk
@@ -43,7 +43,7 @@
## -----------------------------------------------------------------------
json-find-args := $(null)
json-find-args += -name '$(venv-name)'
-lint-json-all:
+lint-json-all:
$(HIDE)$(MAKE) --no-print-directory lint-json-install
$(activate)\
diff --git a/makefiles/lint/yaml/.yamllint b/makefiles/lint/yaml/.yamllint
index 8252511..db8c14d 100644
--- a/makefiles/lint/yaml/.yamllint
+++ b/makefiles/lint/yaml/.yamllint
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2022-2024 Open Networking Foundation (ONF) Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,10 +13,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-# SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors
+# -----------------------------------------------------------------------
+# SPDX-FileCopyrightText: 2024 Open Networking Foundation Contributors
# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------
+
---
yaml-files:
@@ -30,7 +31,8 @@
max: 160
# -----------------------------------------------------------------------
-# .. seealso: https://gerrit.opencord.org/plugins/gitiles/helm-repo-tools/+/refs/heads/master/yamllint.conf
+# .. seealso: https://gerrit.opencord.org/plugins/gitiles/
+# helm-repo-tools/+/refs/heads/master/yamllint.conf
# -----------------------------------------------------------------------
#
# extends: default
@@ -43,3 +45,4 @@
# braces:
# min-spaces-inside: 0
# max-spaces-inside: 1
+# -----------------------------------------------------------------------
diff --git a/makefiles/lint/yaml/byrepo/ci-management/yamllint.conf b/makefiles/lint/yaml/byrepo/ci-management/yamllint.conf
index 32d76ab..b821cb8 100644
--- a/makefiles/lint/yaml/byrepo/ci-management/yamllint.conf
+++ b/makefiles/lint/yaml/byrepo/ci-management/yamllint.conf
@@ -5,4 +5,3 @@
max-end: 1
line-length:
max: 120
-
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/repo b/makefiles/lint/yaml/byrepo/voltha-lib-go/repo
index 99e8451..7011a2c 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/repo
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/repo
@@ -1 +1 @@
-Source from voltha-lib-go
\ No newline at end of file
+Source from voltha-lib-go
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/urls b/makefiles/lint/yaml/byrepo/voltha-lib-go/urls
index 8747658..7609256 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/urls
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/urls
@@ -2,4 +2,4 @@
https://yamllint.readthedocs.io/en/stable/configuration.html
-# [EOF]
\ No newline at end of file
+# [EOF]