45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
=== is related to: S1119
|
|
|
|
=== is related to: S1219
|
|
|
|
=== on 30 Oct 2013, 16:22:59 Freddy Mallet wrote:
|
|
Is implements by \http://jira.codehaus.org/browse/SONARPLUGINS-3218 for Flex
|
|
|
|
=== on 3 Nov 2013, 09:13:25 Ann Campbell wrote:
|
|
Labels are available in more languages than JavaScript & Flex (e.g. Java). Is this rule targeted only to those two languages because the use of labels in other languages is not to be encouraged/tolerated at all?
|
|
|
|
=== on 7 Nov 2013, 09:38:23 Evgeny Mandrikov wrote:
|
|
Indeed Ann, this rule should be applied also for Java, example of weird code:
|
|
|
|
{noformat}
|
|
|
|
class Test {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
label: {
|
|
|
|
System.out.println("1");
|
|
|
|
for (int i = 0; i < 10; i{plus}{plus}) {
|
|
|
|
break label;
|
|
|
|
}
|
|
|
|
System.out.println("2");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{noformat}
|
|
|
|
But IMO it's not easy to list all languages, for which this rule applicable, because some language standards / implementations may do not have labels or forbid usage as goto. For example as far as I know no labels in Python - see \http://www.python.org/dev/peps/pep-3136/
|
|
|
|
=== on 22 Nov 2013, 13:59:17 Freddy Mallet wrote:
|
|
Is implemented by \https://jira.codehaus.org/browse/SONARPLUGINS-3285 for Flex
|
|
|