diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2012-02-13 11:45:47 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2012-02-13 14:52:21 +0100 |
commit | 0b87922a3c36c8ad52bca34c04c44c792f34311a (patch) | |
tree | d6463f13e78928d7b28d77a56488e080b8c186ca | |
parent | 822fa6430d7a09458145bfd00d516df03def88bf (diff) | |
download | sonarqube-0b87922a3c36c8ad52bca34c04c44c792f34311a.tar.gz sonarqube-0b87922a3c36c8ad52bca34c04c44c792f34311a.zip |
Consistent sort of rule parameters during administration of quality profiles
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb index 698c7ad408e..184f49ec782 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb @@ -25,19 +25,19 @@ class RulesParameter < ActiveRecord::Base PARAM_TYPE_STRING = "s" PARAM_TYPE_STRING_LIST = "s{}" - PARAM_TYPE_INTEGER = "i"; - PARAM_TYPE_INTEGER_LIST = "i{}"; - PARAM_TYPE_BOOLEAN = "b"; - PARAM_TYPE_REGEXP = "r"; + PARAM_TYPE_INTEGER = "i" + PARAM_TYPE_INTEGER_LIST = "i{}" + PARAM_TYPE_BOOLEAN = "b" + PARAM_TYPE_REGEXP = "r" belongs_to :rule def is_set_type - return param_type.at(1) == "[" && param_type.ends_with?("]") + param_type.at(1) == "[" && param_type.ends_with?("]") end def get_allowed_tokens - return param_type[2, param_type.length-3].split(",") + param_type[2, param_type.length-3].split(",") end def description @@ -134,4 +134,7 @@ class RulesParameter < ActiveRecord::Base end end + def <=>(other) + name <=> other.name + end end |