2023-05-03 11:06:20 +02:00
|
|
|
== Why is this an issue?
|
|
|
|
|
2021-04-28 18:08:03 +02:00
|
|
|
The long suffix should always be written in uppercase, i.e. 'L', as the lowercase 'l' can easily be confused with the digit one '1'.
|
|
|
|
|
|
|
|
|
2023-05-03 11:06:20 +02:00
|
|
|
=== Noncompliant code example
|
2021-04-28 18:08:03 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,python]
|
2021-04-28 18:08:03 +02:00
|
|
|
----
|
|
|
|
return 10l // Noncompliant; easily confused with one zero one
|
|
|
|
----
|
|
|
|
|
|
|
|
|
2023-05-03 11:06:20 +02:00
|
|
|
=== Compliant solution
|
2021-04-28 18:08:03 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,python]
|
2021-04-28 18:08:03 +02:00
|
|
|
----
|
|
|
|
return 10L
|
|
|
|
----
|
|
|
|
|
|
|
|
|
2021-06-02 20:44:38 +02:00
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
ifdef::env-github,rspecator-view[]
|
2021-09-20 15:38:42 +02:00
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
2023-05-25 14:18:12 +02:00
|
|
|
=== Message
|
|
|
|
|
|
|
|
Replace this lower case "l" long suffix by an upper case "L".
|
|
|
|
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2021-06-08 15:52:13 +02:00
|
|
|
'''
|
2021-06-02 20:44:38 +02:00
|
|
|
== Comments And Links
|
|
|
|
(visible only on this page)
|
|
|
|
|
2023-05-25 14:18:12 +02:00
|
|
|
=== relates to: S818
|
|
|
|
|
|
|
|
=== on 12 Jul 2013, 15:43:05 Dinesh Bolkensteyn wrote:
|
|
|
|
Implemented by \http://jira.codehaus.org/browse/SONARJAVA-208
|
|
|
|
|
|
|
|
=== on 13 Apr 2015, 18:28:57 Evgeny Mandrikov wrote:
|
|
|
|
\[~ann.campbell.2] Looks like duplicate of RSPEC-818
|
|
|
|
|
|
|
|
=== on 20 Apr 2015, 13:52:12 Ann Campbell wrote:
|
|
|
|
deprecated
|
|
|
|
|
|
|
|
=== on 21 Jun 2016, 15:41:37 Elena Vilchik wrote:
|
|
|
|
``++l++``/``++L++`` is irrelevant for Python as this feature was dropped since Python 3.0
|
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
endif::env-github,rspecator-view[]
|