You can't create a variable named "for". Unless you put backticks (``++`++``) around it.
Since that would be the first step down a slippery slope of hopeless confusion, backticks should be removed from identifier names - whether they're keywords or not - and the identifiers renamed as required.
When Objective-C libraries are used in Swift, backticks may be needed around parameter names which are keywords in Swift but not in Objective C. Therefore this rule ignores backticks around parameter names.
\[~ann.campbell.2] Could you add something about not keyword identifiers used with back ticks.
----
var x = 1
print(`x`) // Noncompliant, confuses the reader, no reason to do that
----
=== on 21 May 2015, 11:38:32 Ann Campbell wrote:
see what you think now [~elena.vilchik]
=== on 21 May 2015, 11:43:15 Elena Vilchik wrote:
\[~ann.campbell.2] great!
=== on 24 Jun 2015, 10:14:08 Elena Vilchik wrote:
\[~ann.campbell.2] I have 0 issues on ruling for this rule, so backticks are not really used. So I decided to raise issue on every usage of backticked identifier instead of declaration or first backticked usage (as it will not produce a lot of noise and very-very simple to implement). According with it I've updated message and SQALE. Are you ok with that?
=== on 24 Jun 2015, 12:02:44 Elena Vilchik wrote:
\[~ann.campbell.2] Could you translate "Exceptions" block in normal english language?:)
=== on 24 Jun 2015, 13:54:01 Ann Campbell wrote:
Reworded (so double-check me), but it wasn't bad too start with [~elena.vilchik] :).