From ed9680692840ea10c1d8cf9612b751787014ef08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chastanet?= Date: Sun, 5 Nov 2023 15:11:35 +0100 Subject: [PATCH] copyright year-now --- .pre-commit-config.yaml | 1 - .pre-commit-hooks.yaml | 1 - bin/awkLint | 1 + bin/buildBinFiles | 1 + bin/buildPushDockerImage | 1 + bin/definitionLint | 1 + bin/doc | 2 +- bin/dockerLint | 1 + bin/findShebangFiles | 1 + bin/frameworkLint | 2 +- bin/megalinter | 2 +- bin/plantuml | 1 + bin/runBuildContainer | 1 + bin/shellcheckLint | 1 + bin/test | 2 +- doc/TODO.md | 3 +++ src/_binaries/options/command.awkLint.tpl | 1 + src/_binaries/options/command.buildBinFiles.tpl | 1 + src/_binaries/options/command.buildPushDockerImage.tpl | 1 + src/_binaries/options/command.definitionLint.tpl | 1 + src/_binaries/options/command.doc.tpl | 2 +- src/_binaries/options/command.dockerLint.tpl | 1 + src/_binaries/options/command.findShebangFiles.tpl | 1 + src/_binaries/options/command.frameworkLint.tpl | 2 +- src/_binaries/options/command.megalinter.tpl | 2 +- src/_binaries/options/command.plantuml.tpl | 1 + src/_binaries/options/command.runBuildContainer.tpl | 1 + src/_binaries/options/command.shellcheckLint.tpl | 1 + src/_binaries/options/command.test.tpl | 2 +- src/_binaries/options/options.base.tpl | 1 + 30 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed80675b..bcafbf82 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -81,7 +81,6 @@ repos: args: [-f, tty, --xargs, --staged] pass_filenames: true types: ['executable', 'file', 'shell', 'text'] - files: \.sh$ always_run: false fail_fast: true stages: [commit] diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index b31d1b3f..6e69bc61 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -37,7 +37,6 @@ args: [-f, tty, --xargs, --staged] pass_filenames: true types: ['executable', 'file', 'shell', 'text'] - files: \.sh$ always_run: false fail_fast: true stages: [commit] diff --git a/bin/awkLint b/bin/awkLint index 2f432528..0228bd89 100755 --- a/bin/awkLint +++ b/bin/awkLint @@ -1448,6 +1448,7 @@ Result in checkstyle format.")" return 1 fi } +declare copyrightBeginYear="2022" awkLintCommand parse "${BASH_FRAMEWORK_ARGV[@]}" diff --git a/bin/buildBinFiles b/bin/buildBinFiles index 19ba543f..38e2e177 100755 --- a/bin/buildBinFiles +++ b/bin/buildBinFiles @@ -1469,6 +1469,7 @@ INTERNAL TOOL")" return 1 fi } +declare copyrightBeginYear="2023" buildBinFilesCommand parse "${BASH_FRAMEWORK_ARGV[@]}" diff --git a/bin/buildPushDockerImage b/bin/buildPushDockerImage index f14a6342..38ca866b 100755 --- a/bin/buildPushDockerImage +++ b/bin/buildPushDockerImage @@ -1606,6 +1606,7 @@ INTERNAL return 1 fi } +declare copyrightBeginYear="2023" buildPushDockerImageCommand parse "${BASH_FRAMEWORK_ARGV[@]}" diff --git a/bin/definitionLint b/bin/definitionLint index ac38e75b..dc7056d2 100755 --- a/bin/definitionLint +++ b/bin/definitionLint @@ -1731,6 +1731,7 @@ INTERNAL""" return 1 fi } +declare copyrightBeginYear="2022" declare optionFormat="plain" definitionLintCommand parse "${BASH_FRAMEWORK_ARGV[@]}" diff --git a/bin/doc b/bin/doc index c70eb1ae..8d5ee311 100755 --- a/bin/doc +++ b/bin/doc @@ -1895,7 +1895,7 @@ INTERNAL TOOL""" return 1 fi } - +declare copyrightBeginYear="2022" declare -a RUN_CONTAINER_ARGV_FILTERED=() updateOptionSkipDockerBuildCallback() { if [[ "${IN_BASH_DOCKER:-}" != "You're in docker" ]]; then diff --git a/bin/dockerLint b/bin/dockerLint index 92d09e91..d1c7e854 100755 --- a/bin/dockerLint +++ b/bin/dockerLint @@ -1781,6 +1781,7 @@ ${__HELP_TITLE_COLOR}HADOLINT HELP${__RESET_COLOR} return 1 fi } +declare copyrightBeginYear="2022" dockerLintCommand parse "${BASH_FRAMEWORK_ARGV[@]}" diff --git a/bin/findShebangFiles b/bin/findShebangFiles index 77efaeba..94454b21 100755 --- a/bin/findShebangFiles +++ b/bin/findShebangFiles @@ -1490,6 +1490,7 @@ ${SCRIPT_NAME} chmod +x""" return 1 fi } +declare copyrightBeginYear="2023" declare -a commandToApply=() unknownOptionArgFunction() { diff --git a/bin/frameworkLint b/bin/frameworkLint index 8e352b56..30823997 100755 --- a/bin/frameworkLint +++ b/bin/frameworkLint @@ -1646,7 +1646,7 @@ Lint files of the current repository return 1 fi } - +declare copyrightBeginYear="2022" declare -i optionExpectedWarningsCount=0 optionExpectedWarningsCountCallback() { diff --git a/bin/megalinter b/bin/megalinter index 9864b117..231c5b8e 100755 --- a/bin/megalinter +++ b/bin/megalinter @@ -1788,7 +1788,7 @@ megalinter image oxsecurity/megalinter-terraform:v7.4.0 will be used. return 1 fi } - +declare copyrightBeginYear="2022" declare optionMegalinterConfigFile=".mega-linter-light.yml" declare optionMegalinterImage="oxsecurity/megalinter-terraform:v7.4.0" declare -a megalinterArgs=() diff --git a/bin/plantuml b/bin/plantuml index 79d31828..6784c28b 100755 --- a/bin/plantuml +++ b/bin/plantuml @@ -1516,6 +1516,7 @@ Generates plantuml diagrams from puml files in formats provided""" return 1 fi } +declare copyrightBeginYear="2022" declare optionOutputDir="doc/images" plantumlCallback() { diff --git a/bin/runBuildContainer b/bin/runBuildContainer index 45151a63..9ab0b311 100755 --- a/bin/runBuildContainer +++ b/bin/runBuildContainer @@ -1658,6 +1658,7 @@ additional docker run options can be passed return 1 fi } +declare copyrightBeginYear="2022" # shellcheck disable=SC2317 # if function is overridden unknownOption() { diff --git a/bin/shellcheckLint b/bin/shellcheckLint index 57fb86e6..b73a4d7b 100755 --- a/bin/shellcheckLint +++ b/bin/shellcheckLint @@ -1890,6 +1890,7 @@ ${__HELP_TITLE_COLOR}SHELLCHECK HELP${__RESET_COLOR} fi } +declare copyrightBeginYear="2022" declare optionFormat="tty" declare -a shellcheckArgs=() declare -a shellcheckFiles=() diff --git a/bin/test b/bin/test index 2f3405a9..95530c92 100755 --- a/bin/test +++ b/bin/test @@ -1844,7 +1844,7 @@ ${__HELP_TITLE}Bats help:${__HELP_NORMAL} return 1 fi } - +declare copyrightBeginYear="2022" declare -a batsArgs=() everyOptOrArgCallback() { if [[ -z "$1" || "$1" = "argBats" ]]; then diff --git a/doc/TODO.md b/doc/TODO.md index 8ba66d0f..57eb4d1d 100644 --- a/doc/TODO.md +++ b/doc/TODO.md @@ -142,6 +142,9 @@ TODOs linked to bin/compiler or templates .tpl: +- since export have been removed from UI::theme some + colors interpreted by bash-tpl are not visible anymore + we have to export them only when launching bash-tpl in subshell. - build watch mode - issue with " or ', create a new string symbol in the template in order to get the right escape diff --git a/src/_binaries/options/command.awkLint.tpl b/src/_binaries/options/command.awkLint.tpl index 61fe9054..ccd3d321 100644 --- a/src/_binaries/options/command.awkLint.tpl +++ b/src/_binaries/options/command.awkLint.tpl @@ -12,3 +12,4 @@ Result in checkstyle format." % Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2022" diff --git a/src/_binaries/options/command.buildBinFiles.tpl b/src/_binaries/options/command.buildBinFiles.tpl index b34a148d..a813bcba 100644 --- a/src/_binaries/options/command.buildBinFiles.tpl +++ b/src/_binaries/options/command.buildBinFiles.tpl @@ -22,3 +22,4 @@ options+=( ) Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2023" diff --git a/src/_binaries/options/command.buildPushDockerImage.tpl b/src/_binaries/options/command.buildPushDockerImage.tpl index f10f8e82..1dedb196 100644 --- a/src/_binaries/options/command.buildPushDockerImage.tpl +++ b/src/_binaries/options/command.buildPushDockerImage.tpl @@ -33,3 +33,4 @@ options+=( ) Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2023" diff --git a/src/_binaries/options/command.definitionLint.tpl b/src/_binaries/options/command.definitionLint.tpl index 7c4203a7..4aa44225 100644 --- a/src/_binaries/options/command.definitionLint.tpl +++ b/src/_binaries/options/command.definitionLint.tpl @@ -43,3 +43,4 @@ options+=( ) Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2022" diff --git a/src/_binaries/options/command.doc.tpl b/src/_binaries/options/command.doc.tpl index b2cc5054..3cff84df 100644 --- a/src/_binaries/options/command.doc.tpl +++ b/src/_binaries/options/command.doc.tpl @@ -12,7 +12,7 @@ INTERNAL TOOL % Options::generateCommand "${options[@]}" % - +declare copyrightBeginYear="2022" declare -a RUN_CONTAINER_ARGV_FILTERED=() updateOptionSkipDockerBuildCallback() { if [[ "${IN_BASH_DOCKER:-}" != "You're in docker" ]]; then diff --git a/src/_binaries/options/command.dockerLint.tpl b/src/_binaries/options/command.dockerLint.tpl index 7fd97927..61775ade 100644 --- a/src/_binaries/options/command.dockerLint.tpl +++ b/src/_binaries/options/command.dockerLint.tpl @@ -56,3 +56,4 @@ options+=( ) Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2022" diff --git a/src/_binaries/options/command.findShebangFiles.tpl b/src/_binaries/options/command.findShebangFiles.tpl index 7493e4e4..8a1a7c82 100644 --- a/src/_binaries/options/command.findShebangFiles.tpl +++ b/src/_binaries/options/command.findShebangFiles.tpl @@ -23,3 +23,4 @@ options+=( ) Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2023" diff --git a/src/_binaries/options/command.frameworkLint.tpl b/src/_binaries/options/command.frameworkLint.tpl index 59bd0422..a14f0f27 100644 --- a/src/_binaries/options/command.frameworkLint.tpl +++ b/src/_binaries/options/command.frameworkLint.tpl @@ -36,7 +36,7 @@ options+=( Options::generateCommand "${options[@]}" % - +declare copyrightBeginYear="2022" declare -i optionExpectedWarningsCount=0 optionExpectedWarningsCountCallback() { diff --git a/src/_binaries/options/command.megalinter.tpl b/src/_binaries/options/command.megalinter.tpl index 21f3432e..fdfdcc26 100644 --- a/src/_binaries/options/command.megalinter.tpl +++ b/src/_binaries/options/command.megalinter.tpl @@ -80,7 +80,7 @@ options+=( ) Options::generateCommand "${options[@]}" % - +declare copyrightBeginYear="2022" declare optionMegalinterConfigFile="<% ${defaultMegalinterConfigFile} %>" declare optionMegalinterImage="<% ${defaultMegalinterImage} %>" declare -a megalinterArgs=() diff --git a/src/_binaries/options/command.plantuml.tpl b/src/_binaries/options/command.plantuml.tpl index 6fe787b1..23f8e5af 100644 --- a/src/_binaries/options/command.plantuml.tpl +++ b/src/_binaries/options/command.plantuml.tpl @@ -54,6 +54,7 @@ options+=( ) Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2022" declare optionOutputDir="<% ${optionDefaultOutputDir} %>" plantumlCallback() { diff --git a/src/_binaries/options/command.runBuildContainer.tpl b/src/_binaries/options/command.runBuildContainer.tpl index 43be43e9..41d119ac 100644 --- a/src/_binaries/options/command.runBuildContainer.tpl +++ b/src/_binaries/options/command.runBuildContainer.tpl @@ -39,6 +39,7 @@ options+=( ) Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2022" # shellcheck disable=SC2317 # if function is overridden unknownOption() { diff --git a/src/_binaries/options/command.shellcheckLint.tpl b/src/_binaries/options/command.shellcheckLint.tpl index 2d8262fb..f659b868 100644 --- a/src/_binaries/options/command.shellcheckLint.tpl +++ b/src/_binaries/options/command.shellcheckLint.tpl @@ -70,6 +70,7 @@ options+=( Options::generateCommand "${options[@]}" % +declare copyrightBeginYear="2022" declare optionFormat="<% ${optionFormatDefault} %>" declare -a shellcheckArgs=() declare -a shellcheckFiles=() diff --git a/src/_binaries/options/command.test.tpl b/src/_binaries/options/command.test.tpl index a4be8e02..9e67eb2b 100644 --- a/src/_binaries/options/command.test.tpl +++ b/src/_binaries/options/command.test.tpl @@ -47,7 +47,7 @@ options+=( ) Options::generateCommand "${options[@]}" % - +declare copyrightBeginYear="2022" declare -a batsArgs=() everyOptOrArgCallback() { if [[ -z "$1" || "$1" = "argBats" ]]; then diff --git a/src/_binaries/options/options.base.tpl b/src/_binaries/options/options.base.tpl index fd7332bb..a78523dd 100644 --- a/src/_binaries/options/options.base.tpl +++ b/src/_binaries/options/options.base.tpl @@ -4,6 +4,7 @@ %# - SCRIPT_NAME %# - help %# - longDescription +%# - copyrightBeginYear % # shellcheck source=/dev/null source <(