Skip to content

Consider absence of explicit `allow_null: true` to be an offense too

What does this MR do?

Extends the RuboCop cop added in !21177 (merged). It will make not only allow_null: false option for add_column_with_default an offense, but also the absence of allow_null option. The reason for this is that allow_null: false is the default, so currently the cop misses half of the cases it's intended to detect.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #38385 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports