[xwiki/xwiki-platform] 3fcedc: Fix SonarQube S3516: Refactor Inclusion validator ...
Branch: refs/heads/claude/magical-faraday-A18El Home: https://github.com/xwiki/xwiki-platform Commit: 3fcedc4e84b364a1ae9d5cca97841024480f55ac https://github.com/xwiki/xwiki-platform/commit/3fcedc4e84b364a1ae9d5cca97841... Author: Claude <[email protected]> Date: 2026-05-15 (Fri, 15 May 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: ----------- 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. SonarCloud issue: https://sonarcloud.io/project/issues?open=AY1U1sQy0GHv9uFD3jfx&id=org.xwiki.... To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications