checkDuplicateAttributes

Checks classdef files and reports any methods or properties blocks with duplicate attribute values. Decrease the number of methods and properties blocks by combining blocks that have identical attribute values into one. This check considers setting an attribute to its default value equal to omitting the attribute. See what the default values for all attributes are in the [MathWorks documentation]{style="color: blue"}. Keep the following in mind for this check:

  • The following sets of attributes are considered equal: (Hidden = true), (Hidden = 1) and (Hidden)

  • The order of attributes is ignored, so these are considered equal: (Hidden, Constant, Access = private) and (Constant, Access = private, Hidden)

  • An empty list of classes that can access the properties or methods is equal to setting private access: (Access = {}) equals (Access = private)

  • Because setting an attribute to its default value is considered equal to omitting the attributes, these are considered equal: (Access = protected, Constant = false, Transient = false) and (Access = protected)

Exemption tag: %@ok<DUPAT>