Skip to content

chore: split validation logic in smaller functions - #5892

Merged
ferrarimarco merged 1 commit into
mainfrom
move-config-init
Jul 16, 2024
Merged

ferrarimarco merged 1 commit into
mainfrom
move-config-init

Conversation

@ferrarimarco

Copy link
Copy Markdown
Collaborator

Proposed changes

  • Move USE_FIND_ALGORITHM and VALIDATE_ALL_CODEBASE validation in a dedicated function (ValidateFindMode).
  • Move ANSIBLE_DIRECTORY validation to a dedicated function (ValidateAnsibleDirectory).
  • Move VALIDATE_xxxx variables validation to a dedicated function (ValidateValidationVariables).
  • Mark ANY_SET, ANY_TRUE, ANY_FALSE as local because we don't need to reference them anywhere outside ValidateValidationVariables.
  • Add some debug statements in validation functions.
  • Merge the loops to initialize VALIDATE_xxx variables and to print enable/disable language debug messages.
  • Add tests for these validation functions.
  • Add test start message for all tests.

Readiness checklist

In order to have this pull request merged, complete the following tasks.

Pull request author tasks

  • I checked that all workflows return a success.
  • I included all the needed documentation for this change.
  • I provided the necessary tests.
  • I squashed all the commits into a single commit.
  • I followed the Conventional Commit v1.0.0 spec.
  • I wrote the necessary upgrade instructions in the upgrade guide.
  • If this pull request is about and existing issue,
    I added the Fix #ISSUE_NUMBER or Close #ISSUE_NUMBER text to the description of the pull request.

Super-linter maintainer tasks

  • Label as breaking if this change breaks compatibility with the previous released version.
  • Label as either: automation, bug, documentation, enhancement, infrastructure.
  • Add the pull request to a milestone, eventually creating one, that matches with the version that release-please proposes.

@ferrarimarco ferrarimarco added infrastructure related to project structure and maintenance O: backlog 🤖 Backlog, stale ignores this label labels Jul 15, 2024
@ferrarimarco ferrarimarco added this to the 6.8.0 milestone Jul 15, 2024
@ferrarimarco ferrarimarco self-assigned this Jul 15, 2024
- Move USE_FIND_ALGORITHM and VALIDATE_ALL_CODEBASE validation in a
  dedicated function (ValidateFindMode).
- Move ANSIBLE_DIRECTORY validation to a dedicated function
  (ValidateAnsibleDirectory).
- Move VALIDATE_xxxx variables validation to a dedicated function
  (ValidateValidationVariables).
- Mark ANY_SET, ANY_TRUE, ANY_FALSE as local because we don't need to
  reference them anywhere outside ValidateValidationVariables.
- Add some debug statements in validation functions.
- Merge the loops to initialize VALIDATE_xxx variables and to print
  enable/disable language debug messages.
- Add tests for these validation functions.
- Add test start message for all tests.
@ferrarimarco

Copy link
Copy Markdown
Collaborator Author

@zkoppert Can you please have a look at this PR? It shouldn't have any visible side effect, but just in case :)

Thanks!

@zkoppert zkoppert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅

@ferrarimarco

Copy link
Copy Markdown
Collaborator Author

Thanks for the review @zkoppert !

@ferrarimarco
ferrarimarco added this pull request to the merge queue Jul 16, 2024
Merged via the queue into main with commit d2d7334 Jul 16, 2024
@ferrarimarco
ferrarimarco deleted the move-config-init branch July 16, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure related to project structure and maintenance O: backlog 🤖 Backlog, stale ignores this label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants