Forbidden bitwise operation Open
Host = 1 << 2,
- Read upRead up
- Exclude checks
Rule: no-bitwise
Disallows bitwise operators.
Specifically, the following bitwise operators are banned:
&
, &=
, |
, |=
,
^
, ^=
, <<
, <<=
,
>>
, >>=
, >>>
, >>>=
, and ~
.
This rule does not ban the use of &
and |
for intersection and union types.
Rationale
Bitwise operators are often typos - for example bool1 & bool2
instead of bool1 && bool2
.
They also can be an indicator of overly clever code which decreases maintainability.
Config
Not configurable.
Examples
"no-bitwise": true
For more information see this page.
Forbidden bitwise operation Open
PublicKey = 1 << 0,
- Read upRead up
- Exclude checks
Rule: no-bitwise
Disallows bitwise operators.
Specifically, the following bitwise operators are banned:
&
, &=
, |
, |=
,
^
, ^=
, <<
, <<=
,
>>
, >>=
, >>>
, >>>=
, and ~
.
This rule does not ban the use of &
and |
for intersection and union types.
Rationale
Bitwise operators are often typos - for example bool1 & bool2
instead of bool1 && bool2
.
They also can be an indicator of overly clever code which decreases maintainability.
Config
Not configurable.
Examples
"no-bitwise": true
For more information see this page.
Forbidden bitwise operation Open
Password = 1 << 1,
- Read upRead up
- Exclude checks
Rule: no-bitwise
Disallows bitwise operators.
Specifically, the following bitwise operators are banned:
&
, &=
, |
, |=
,
^
, ^=
, <<
, <<=
,
>>
, >>=
, >>>
, >>>=
, and ~
.
This rule does not ban the use of &
and |
for intersection and union types.
Rationale
Bitwise operators are often typos - for example bool1 & bool2
instead of bool1 && bool2
.
They also can be an indicator of overly clever code which decreases maintainability.
Config
Not configurable.
Examples
"no-bitwise": true
For more information see this page.
Forbidden bitwise operation Open
Any = ~0,
- Read upRead up
- Exclude checks
Rule: no-bitwise
Disallows bitwise operators.
Specifically, the following bitwise operators are banned:
&
, &=
, |
, |=
,
^
, ^=
, <<
, <<=
,
>>
, >>=
, >>>
, >>>=
, and ~
.
This rule does not ban the use of &
and |
for intersection and union types.
Rationale
Bitwise operators are often typos - for example bool1 & bool2
instead of bool1 && bool2
.
They also can be an indicator of overly clever code which decreases maintainability.
Config
Not configurable.
Examples
"no-bitwise": true
For more information see this page.
Forbidden bitwise operation Open
GssApi = 1 << 5,
- Read upRead up
- Exclude checks
Rule: no-bitwise
Disallows bitwise operators.
Specifically, the following bitwise operators are banned:
&
, &=
, |
, |=
,
^
, ^=
, <<
, <<=
,
>>
, >>=
, >>>
, >>>=
, and ~
.
This rule does not ban the use of &
and |
for intersection and union types.
Rationale
Bitwise operators are often typos - for example bool1 & bool2
instead of bool1 && bool2
.
They also can be an indicator of overly clever code which decreases maintainability.
Config
Not configurable.
Examples
"no-bitwise": true
For more information see this page.
Forbidden bitwise operation Open
Keyboard = 1 << 3,
- Read upRead up
- Exclude checks
Rule: no-bitwise
Disallows bitwise operators.
Specifically, the following bitwise operators are banned:
&
, &=
, |
, |=
,
^
, ^=
, <<
, <<=
,
>>
, >>=
, >>>
, >>>=
, and ~
.
This rule does not ban the use of &
and |
for intersection and union types.
Rationale
Bitwise operators are often typos - for example bool1 & bool2
instead of bool1 && bool2
.
They also can be an indicator of overly clever code which decreases maintainability.
Config
Not configurable.
Examples
"no-bitwise": true
For more information see this page.
Forbidden bitwise operation Open
Agent = 1 << 4,
- Read upRead up
- Exclude checks
Rule: no-bitwise
Disallows bitwise operators.
Specifically, the following bitwise operators are banned:
&
, &=
, |
, |=
,
^
, ^=
, <<
, <<=
,
>>
, >>=
, >>>
, >>>=
, and ~
.
This rule does not ban the use of &
and |
for intersection and union types.
Rationale
Bitwise operators are often typos - for example bool1 & bool2
instead of bool1 && bool2
.
They also can be an indicator of overly clever code which decreases maintainability.
Config
Not configurable.
Examples
"no-bitwise": true
For more information see this page.