Details
- Reviewers
- None
- Bugzilla Bug ID
- 1387052
Diff Detail
- Repository
- rMOZILLACENTRAL mozilla-central
- Branch
- worse (branched from master)
Event Timeline
Code analysis found 11 defects in this patch:
- 4 defects found by clang-tidy
- 7 defects found by mozlint
You can run this analysis locally with:
- ./mach static-analysis check path/to/file.cpp (C/C++)
- ./mach lint path/to/file (JS/Python)
If you see a problem in this automated review, please report it here: https://bit.ly/2tb8Qk3
| devtools/client/definitions.js | ||
|---|---|---|
| 7 | Error: Infix operators must be spaced. [eslint: space-infix-ops] | |
| devtools/client/menus.js | ||
| 42 | Error: Unexpected tab character. [eslint: no-tabs] | |
| devtools/client/shared/scroll.js | ||
| 7 | Error: Parsing error: Unexpected character '#' [eslint] | |
| js/ductwork/debugger/JSDebugger.cpp | ||
| 53 | Warning: Do not use 'else' after 'return' [clang-tidy: readability-else-after-return] else if (!JS_IsGlobalObject(obj)) { // readability-else-after-return
^~~~~~~~ | |
| js/src/jsapi.cpp | ||
| 124 | Warning: Suspicious string literal, probably missing a comma [clang-tidy: misc-suspicious-missing-comma] "line 6" // misc-suspicious-missing-comma ^ | |
| 136 | Error: Methods annotated with MOZ_NO_DANGLING_ON_TEMPORARIES cannot be && ref-qualified [clang-tidy: mozilla-dangling-on-temporary] MOZ_NO_DANGLING_ON_TEMPORARIES int *get() && { return nullptr; } // mozilla-dangling-on-temporary
^ | |
| 137 | Error: Methods annotated with MOZ_NO_DANGLING_ON_TEMPORARIES must return a pointer [clang-tidy: mozilla-dangling-on-temporary] MOZ_NO_DANGLING_ON_TEMPORARIES int test() { return 0; } // mozilla-dangling-on-temporary
^ | |
| toolkit/components/telemetry/gen_event_data.py | ||
| 37 | Error: Missing whitespace around operator [flake8: E225] | |
| 37 | Error: At least two spaces before inline comment [flake8: E261] | |
| 37 | Error: Line too long (177 > 99 characters) [flake8: E501] | |
| 57 | Error: Continuation line under-indented for visual indent [flake8: E128] | |
Code analysis found 17 defects in this patch:
- 10 defects found by clang-tidy
- 7 defects found by mozlint
You can run this analysis locally with:
- ./mach static-analysis check path/to/file.cpp (C/C++)
- ./mach lint path/to/file (JS/Python)
If you see a problem in this automated review, please report it here: https://bit.ly/2tb8Qk3
| devtools/client/definitions.js | ||
|---|---|---|
| 7 | Error: Infix operators must be spaced. [eslint: space-infix-ops] | |
| devtools/client/menus.js | ||
| 42 | Error: Unexpected tab character. [eslint: no-tabs] | |
| devtools/client/shared/scroll.js | ||
| 7 | Error: Parsing error: Unexpected character '#' [eslint] | |
| js/ductwork/debugger/JSDebugger.cpp | ||
| 53 | Warning: Do not use 'else' after 'return' [clang-tidy: readability-else-after-return] else if (!JS_IsGlobalObject(obj)) { // readability-else-after-return
^~~~~~~~ | |
| js/src/jsapi.cpp | ||
| 124 | Warning: Suspicious string literal, probably missing a comma [clang-tidy: misc-suspicious-missing-comma] "line 6" // misc-suspicious-missing-comma ^ | |
| 136 | Error: Methods annotated with MOZ_NO_DANGLING_ON_TEMPORARIES cannot be && ref-qualified [clang-tidy: mozilla-dangling-on-temporary] MOZ_NO_DANGLING_ON_TEMPORARIES int *get() && { return nullptr; } // mozilla-dangling-on-temporary
^ | |
| 137 | Error: Methods annotated with MOZ_NO_DANGLING_ON_TEMPORARIES must return a pointer [clang-tidy: mozilla-dangling-on-temporary] MOZ_NO_DANGLING_ON_TEMPORARIES int test() { return 0; } // mozilla-dangling-on-temporary
^ | |
| 189 | Warning: Do not use 'else' after 'return' [clang-tidy: readability-else-after-return] else if (ErrorTakesArguments(code_)) { // readability-misleading-indentation or readability-else-after-return
^~~~~~~~ | |
| 224 | Warning: Variable 'x' with floating point type 'float' should not be used as a loop counter [clang-tidy: clang-analyzer-security.FloatLoopCounter] for (float x = 0.1f; x <= 1.0f; x += 0.1f) {} // clang-analyzer-security.FloatLoopCounter
^ | |
| 226 | Warning: The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges [clang-tidy: clang-analyzer-security.insecureAPI.UncheckedReturn] setuid(1); // clang-analyzer-security.insecureAPI.UncheckedReturn ^ | |
| 230 | Warning: Potentially unintended semicolon [clang-tidy: misc-suspicious-semicolon] if (x < y); // misc-suspicious-semicolon
^ | |
| 248 | Warning: Value stored to 'x' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores] x = 1; // clang-analyzer-deadcode.DeadStores ^ | |
| 347 | Warning: 'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character [clang-tidy: performance-faster-string-find] str.find("A"); // performance-faster-string-find
^~~~
'A' | |
| toolkit/components/telemetry/gen_event_data.py | ||
| 37 | Error: Missing whitespace around operator [flake8: E225] | |
| 37 | Error: At least two spaces before inline comment [flake8: E261] | |
| 37 | Error: Line too long (177 > 99 characters) [flake8: E501] | |
| 57 | Error: Continuation line under-indented for visual indent [flake8: E128] | |
Code analysis found 17 defects in this patch:
- 10 defects found by clang-tidy
- 7 defects found by mozlint
You can run this analysis locally with:
- ./mach static-analysis check path/to/file.cpp (C/C++)
- ./mach lint path/to/file (JS/Python)
If you see a problem in this automated review, please report it here: https://bit.ly/2tb8Qk3
| devtools/client/definitions.js | ||
|---|---|---|
| 7 | Error: Infix operators must be spaced. [eslint: space-infix-ops] | |
| devtools/client/menus.js | ||
| 42 | Error: Unexpected tab character. [eslint: no-tabs] | |
| devtools/client/shared/scroll.js | ||
| 7 | Error: Parsing error: Unexpected character '#' [eslint] | |
| js/ductwork/debugger/JSDebugger.cpp | ||
| 53 | Warning: Do not use 'else' after 'return' [clang-tidy: readability-else-after-return] else if (!JS_IsGlobalObject(obj)) { // readability-else-after-return
^~~~~~~~ | |
| js/src/jsapi.cpp | ||
| 124 | Warning: Suspicious string literal, probably missing a comma [clang-tidy: misc-suspicious-missing-comma] "line 6" // misc-suspicious-missing-comma ^ | |
| 136 | Error: Methods annotated with MOZ_NO_DANGLING_ON_TEMPORARIES cannot be && ref-qualified [clang-tidy: mozilla-dangling-on-temporary] MOZ_NO_DANGLING_ON_TEMPORARIES int *get() && { return nullptr; } // mozilla-dangling-on-temporary
^ | |
| 137 | Error: Methods annotated with MOZ_NO_DANGLING_ON_TEMPORARIES must return a pointer [clang-tidy: mozilla-dangling-on-temporary] MOZ_NO_DANGLING_ON_TEMPORARIES int test() { return 0; } // mozilla-dangling-on-temporary
^ | |
| 189 | Warning: Do not use 'else' after 'return' [clang-tidy: readability-else-after-return] else if (ErrorTakesArguments(code_)) { // readability-misleading-indentation or readability-else-after-return
^~~~~~~~ | |
| 224 | Warning: Variable 'x' with floating point type 'float' should not be used as a loop counter [clang-tidy: clang-analyzer-security.FloatLoopCounter] for (float x = 0.1f; x <= 1.0f; x += 0.1f) {} // clang-analyzer-security.FloatLoopCounter
^ | |
| 226 | Warning: The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges [clang-tidy: clang-analyzer-security.insecureAPI.UncheckedReturn] setuid(1); // clang-analyzer-security.insecureAPI.UncheckedReturn ^ | |
| 230 | Warning: Potentially unintended semicolon [clang-tidy: misc-suspicious-semicolon] if (x < y); // misc-suspicious-semicolon
^ | |
| 248 | Warning: Value stored to 'x' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores] x = 1; // clang-analyzer-deadcode.DeadStores ^ | |
| 347 | Warning: 'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character [clang-tidy: performance-faster-string-find] str.find("A"); // performance-faster-string-find
^~~~
'A' | |
| toolkit/components/telemetry/gen_event_data.py | ||
| 37 | Error: Missing whitespace around operator [flake8: E225] | |
| 37 | Error: At least two spaces before inline comment [flake8: E261] | |
| 37 | Error: Line too long (177 > 99 characters) [flake8: E501] | |
| 57 | Error: Continuation line under-indented for visual indent [flake8: E128] | |