commit | 7614e22859879701f7653db734bd9a19b3ed10b2 | [log] [tgz] |
---|---|---|
author | Joey Armstrong <joey@opennetworking.org> | Thu Sep 28 17:18:33 2023 -0400 |
committer | Joey Armstrong <joey@opennetworking.org> | Mon Oct 02 13:33:26 2023 +0000 |
tree | 1ed76c96e17c747893de22d795733adf7f5ffcf3 | |
parent | 71f39c26f988ef0698703c3deb32fd13c4459d06 [diff] |
Enhance shellcheck lint target (3 of 3 -- lint-shell target logic) makefiles/lint/shell/help.mk ---------------------------- o Top level include used to source all lint-shell library makefiles. o Loosely based on makefiles/{groovy,doc8}/*. o Currently library makefile makefiles/shell.mk deprecation pending. o Prefix yet-to-be-added makefile includes with hyphen to prevent errors. makefiles/lint/shell/shellcheck.sh ---------------------------------- o Enhance makefiles/shell.mk to support more lint targets. o Three targets are now supported: - lint-shell-all current behavior, run shellcheck on all sources - lint-shell-mod new: lint locally modified files (~git status) - lint-shell-src new: run shellcheck on a list of files passed in. o Added helper function gen-lint-shell-deps: - generate a list of dependency based on makefile target. - dependency list is assigned to a variable named for the target. - avoids having to inline duplicate construction around targets. o Each target lint-shell-{all,mod,src} defines a list of dependencies/files to launch shellcheck on. o Target dependency lists allowed replacing "find | xargs shellcheck" commands with an explicit per-source-to-check target. o Structure will also allow supporting exclusion lists in the future. unit-testing: Helper script mcheck.sh will create a usable sandbox from shellcheck patches to evaluate targets. shellcheck (make lint-shell*) will report problems in bin/setup.sh: o https://wiki.opennetworking.org/display/VOLTHA/repo%3Aonf-make Change-Id: Id6ed1f66f80e63b4cc1c857f56c1fa342635df62
This repository contains common makefile logic and targets that can be used to build arbitrary repositories. Makefile logic is currently being consumed by the VOLTHA project
Two distinct sets of makefiles are needed to support builds:
The first is a subdir of makefiles/ named 'onf-make'
The second makefile directory contains repository/project specific logic:
Most makefile logic can be parameterized and implemented to support reuse. Consider adding enhancements or refactoring local/ makefile logic into repo:onf-make so all makefiles can leverage it.
% tree --charset=ascii -n Makefile config.mk makefiles/ |-- include.mk |-- local | |-- include.mk | | | |-- doc8 | | | | |-- doc8.ini (alas only one --config switch allowed) |-- [onf-make: git-submodule](https://github.com/opencord/onf-make) | |-- makefiles | | |-- consts.mk | | |-- include.mk | | |-- lint | | | |-- doc8 Syntax check ReStructuredText (rst) files | | | |-- groovy | | | |-- python | | | |-- robot.mk Syntax check robot testing framework | | | |-- shell.mk Invoke shellcheck command on scripts | | | |-- yaml Syntax check yaml configs
Refactor and merge logic from available repository makefiles/ directories.
Update to make use of library makefiles
Exercise make lint targets, bulk cleanup is needed across all repositories.
Relocate $sandbox/config.mk into makefiles/config.mk
Ascii art was rendered using
README.md can be rendered locally using