Consider extending test-functions-doc with invocation of undeclared functions #939
Labels
enhancement
New feature or request
functions
related to the collection of bash functions in functions[-core] file
test
related to testing and QA
Milestone
As a devonfw-ide PO, I want automated tests on the code so that bugs are detected early.
Developing bash is tedious. Where other programming languages like Java or C# would raise compile errors, we get successful build and tests even though the code is obviously broken.
As we have a strict convention to name all functions following the pattern
do[A-Z][a-zA-Z]*
we could easily extend ourtest-functions-doc
with a check that greps all such patterns from functions and for each unique of them (sort -u
) check if has been declared.Otherwise raise and error and break the build.
So if
functions
contains e.g.doUndefinedFunction
but notfunction doUndefinedFunction()
then the test should report thatdoUndefinedFunction
is undefined and fail.The text was updated successfully, but these errors were encountered: