[xwiki/xwiki-platform] 831dfb: [Misc] Fix SonarQube S3516: Refactor Inclusion val...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: 831dfbac2228100ef19046ea9dfdb9da06849aa0 https://github.com/xwiki/xwiki-platform/commit/831dfbac2228100ef19046ea9dfdb... Author: Vincent Massol <[email protected]> Date: 2026-06-09 (Tue, 09 Jun 2026) Changed paths: M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/resources/uicomponents/widgets/validation/livevalidation_prototype.js Log Message: ----------- [Misc] Fix SonarQube S3516: Refactor Inclusion validator to have a single return path The Inclusion validation function had two `return true` statements (one early return for null+allowNull and one at the end), both always returning the same constant value. This triggered SonarQube rule javascript:S3516 "Functions should not always return the same value". Refactored the null check into an if/else structure so the null handling falls through to the single return at the end of the function. Behavior is identical: null values fail when allowNull is false, non-null values are validated against the inclusion list. Co-authored-by: Claude <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications