== Why is this an issue?

The repetition of a unary operator is usually a typo. The second operator invalidates the first one in most cases:

[source,go]
----
  var a int = 1
  var flag bool = true

  var a1 int = ^^^a // Noncompliant: equivalent to "^a"
  var flag2 bool  = !!!flag  // Noncompliant: equivalent to "!flag"
----

On the other hand, while repeating the increment and decrement operators is technically correct, it obfuscates the meaning:

[source,go]
----
var i int = 1
var j int = ++ ++i  // Noncompliant
var k int = -- --i  // Noncompliant
----

Using ``+=`` or ``-=`` improves readability:

[source,go]
----
var i int = 1
i += 2
var j int = i
i -=2
var k int = i
----

This rule raises an issue for repetitions of ``++!++``, ``++^++``, ``++-++``, ``{plus}``, increment ``++`` and decrement ``--`` operators.


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::../message.adoc[]

'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]

endif::env-github,rspecator-view[]
