Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider extending test-functions-doc with invocation of undeclared functions #939

Closed
hohwille opened this issue Oct 11, 2022 · 1 comment · Fixed by #995
Closed

Consider extending test-functions-doc with invocation of undeclared functions #939

hohwille opened this issue Oct 11, 2022 · 1 comment · Fixed by #995
Assignees
Labels
enhancement New feature or request functions related to the collection of bash functions in functions[-core] file test related to testing and QA

Comments

@hohwille
Copy link
Member

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 our test-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 not function doUndefinedFunction() then the test should report that doUndefinedFunction is undefined and fail.

@hohwille hohwille added the enhancement New feature or request label Oct 11, 2022
@hohwille hohwille added Prio middle test related to testing and QA functions related to the collection of bash functions in functions[-core] file labels Oct 13, 2022
@mustafaokyay
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request functions related to the collection of bash functions in functions[-core] file test related to testing and QA
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants