-
Bug
-
Resolution: Done
-
Minor
-
None
-
2.9
-
None
-
all
-
MOODLE_29_STABLE
Some versions ago we added a new sniff to look for proper spacing around operators:
Squiz.WhiteSpace.OperatorSpacing
https://github.com/stronk7/moodle-local_codechecker/commit/1b0301e5a8ce3887f31304c364dff7d0941dbc55
with tests:
https://github.com/stronk7/moodle-local_codechecker/commit/ea6b896a287df8faaeebf312b6650ec88535bceb
In the plugin DB, gb2048 commented that such a sniff is missing some operators (bitwise and friends):
Gents,
|
|
Using 2.3.1 - San Fermín release! and getting errors for legitimate code in a js file:
|
|
value·=·value·<<·2;
|
Expected 1 space after "<"; 0 found
|
Expected 1 space before "<"; 0 found
|
|
.....
|
|
value·|=·toggleflag;
|
Expected 1 space after "|"; 0 found
|
Expected 1 space before "="; 0 found
|
|
.....
|
|
value·&=·~toggleflag;
|
Expected 1 space after "&" operator; 0 found
|
Expected 1 space before "="; 0 found
|
This is about to add those missing operators to the Sniff in order to get them properly evaluated.
Ciao
- has a non-specific relationship to
-
MDL-52127 Check Moodle JS coding style with eslint
- Closed
- will be (partly) resolved by
-
CONTRIB-6175 Make codechecker to ignore JS files completely
- Closed
-
CONTRIB-8122 Undue error report in codechecher (processing JS files)
- Closed