Page MenuHomePhabricator Dev

Bug 1387052 - Make Firefox code worse intentionally. r=reviewbot
Needs ReviewPublic

Authored by janx on Jun 14 2018, 5:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 13, 1:00 PM
Unknown Object (File)
Sat, Oct 10, 11:22 AM
Unknown Object (File)
Aug 10 2026, 11:28 AM
Unknown Object (File)
Aug 8 2026, 1:52 PM
Unknown Object (File)
Jul 20 2026, 6:13 AM
Unknown Object (File)
Jun 20 2026, 11:49 AM
Unknown Object (File)
Jun 14 2026, 3:52 PM
Unknown Object (File)
Jun 9 2026, 4:50 PM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Bugzilla Bug ID
1387052

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Branch
master

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".Jun 14 2018, 5:27 PM
phab-bot changed the edit policy from "Custom Policy" to "All Users".
phab-bot removed a project: Restricted Project.
janx requested review of this revision.Jun 14 2018, 5:27 PM

Code analysis found 16 defects in this patch:

  • 8 defects found by clang-tidy
  • 8 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: http://bit.ly/2y9N9Vx

devtools/client/definitions.js
7–8

Error: Infix operators must be spaced. [eslint: space-infix-ops]

devtools/client/menus.js
31–32

Error: Use the global form of 'use strict'. [eslint: strict]

41–42

Error: Unexpected tab character. [eslint: no-tabs]

devtools/client/shared/scroll.js
7–8

Error: Parsing error: unexpected character '#' [eslint]

js/src/jsapi.cpp
132–133

Error: Methods annotated with moz_no_dangling_on_temporaries cannot be && ref-qualified [clang-tidy: mozilla-dangling-on-temporary]

133–134

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
                                   ^

Warning: modernize-redundant-void-arg in /cache/sa-central/js/src/jsapi.cpp: redundant void argument list in function definition

1715–1716

Warning: Escaped string literal can be written as a raw string literal [clang-tidy: modernize-raw-string-literal]

"\"string\", \"number\", or \"default\"", source);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R"("string", "number", or "default")"

Warning: modernize-use-auto in /cache/sa-central/js/src/jsapi.cpp: use auto when initializing with a cast to avoid duplicating the type name

3856–3857

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

AutoFile()
^

Warning: modernize-use-equals-default in /cache/sa-central/js/src/jsapi.cpp: use '= default' to define a trivial destructor

3859–3860

Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default]

~AutoFile()
^

Warning: modernize-use-equals-default in /cache/sa-central/js/src/jsapi.cpp: use '= default' to define a trivial destructor

5772–5773

Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default]

JS::AutoSetAsyncStackForNewCalls::~AutoSetAsyncStackForNewCalls()

^

Warning: modernize-use-equals-default in /cache/sa-central/js/src/jsapi.cpp: use '= default' to define a trivial default constructor

7029–7030

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

JSErrorNotes::JSErrorNotes()

^

Warning: modernize-use-equals-default in /cache/sa-central/js/src/jsapi.cpp: use '= default' to define a trivial destructor

7033–7034

Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default]

JSErrorNotes::~JSErrorNotes()

^

Warning: modernize-redundant-void-arg in /cache/sa-central/js/src/jsapi.cpp: redundant void argument list in function definition

toolkit/components/telemetry/gen_event_data.py
37–38

Error: Missing whitespace around operator [flake8: E225]

37–38

Error: At least two spaces before inline comment [flake8: E261]

37–38

Error: Line too long (177 > 99 characters) [flake8: E501]

57–58

Error: Continuation line under-indented for visual indent [flake8: E128]

Code analysis found 16 defects in this patch:

  • 8 defects found by clang-tidy
  • 8 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: http://bit.ly/2y9N9Vx

devtools/client/definitions.js
7–8

Error: Infix operators must be spaced. [eslint: space-infix-ops]

devtools/client/menus.js
31–32

Error: Use the global form of 'use strict'. [eslint: strict]

41–42

Error: Unexpected tab character. [eslint: no-tabs]

devtools/client/shared/scroll.js
7–8

Error: Parsing error: unexpected character '#' [eslint]

js/src/jsapi.cpp
132–133

Error: Methods annotated with moz_no_dangling_on_temporaries cannot be && ref-qualified [clang-tidy: mozilla-dangling-on-temporary]

133–134

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
                                   ^

Warning: modernize-redundant-void-arg in /app/tmp/sa-central/js/src/jsapi.cpp: redundant void argument list in function definition

1715–1716

Warning: Escaped string literal can be written as a raw string literal [clang-tidy: modernize-raw-string-literal]

"\"string\", \"number\", or \"default\"", source);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R"("string", "number", or "default")"

Warning: modernize-use-auto in /app/tmp/sa-central/js/src/jsapi.cpp: use auto when initializing with a cast to avoid duplicating the type name

3856–3857

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

AutoFile()
^

Warning: modernize-use-equals-default in /app/tmp/sa-central/js/src/jsapi.cpp: use '= default' to define a trivial destructor

3859–3860

Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default]

~AutoFile()
^

Warning: modernize-use-equals-default in /app/tmp/sa-central/js/src/jsapi.cpp: use '= default' to define a trivial destructor

5772–5773

Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default]

JS::AutoSetAsyncStackForNewCalls::~AutoSetAsyncStackForNewCalls()

^

Warning: modernize-use-equals-default in /app/tmp/sa-central/js/src/jsapi.cpp: use '= default' to define a trivial default constructor

7029–7030

Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default]

JSErrorNotes::JSErrorNotes()

^

Warning: modernize-use-equals-default in /app/tmp/sa-central/js/src/jsapi.cpp: use '= default' to define a trivial destructor

7033–7034

Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default]

JSErrorNotes::~JSErrorNotes()

^

Warning: modernize-redundant-void-arg in /app/tmp/sa-central/js/src/jsapi.cpp: redundant void argument list in function definition

toolkit/components/telemetry/gen_event_data.py
37–38

Error: Missing whitespace around operator [flake8: E225]

37–38

Error: At least two spaces before inline comment [flake8: E261]

37–38

Error: Line too long (177 > 99 characters) [flake8: E501]

57–58

Error: Continuation line under-indented for visual indent [flake8: E128]