Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Issue 12212127: [cleanup] Files.app: Remove Function declarations within blocks #3 (Closed)

Created:
7 years, 10 months ago by yoshiki
Modified:
7 years, 10 months ago
Reviewers:
kinaba
CC:
chromium-reviews, rginda+watch_chromium.org, arv+watch_chromium.org
Visibility:
Public.

Description

[cleanup] Files.app: Remove Function declarations within blocks #3 Use a variable initialized with a Function Expression instead. Function declarations within blocks are prohibited by the style guide. http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone=Function_Declarations_Within_Blocks#Function_Declarations_Within_Blocks In addition, they don't work in strict mode. BUG=174809 TEST=presubmit passes, Files.app launched. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=181923

Patch Set 1 #

Messages

Total messages: 4 (0 generated)
yoshiki
@kinaba-san, could you take a look? thanks,
7 years, 10 months ago (2013-02-12 06:19:43 UTC) #1
kinaba
lgtm
7 years, 10 months ago (2013-02-12 06:50:19 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/12212127/1
7 years, 10 months ago (2013-02-12 08:57:36 UTC) #3
commit-bot: I haz the power
7 years, 10 months ago (2013-02-12 08:57:46 UTC) #4
Presubmit check for 12212127-1 failed and returned exit status 1.

INFO:root:Found 7 file(s).

Running presubmit commit checks ...
Running /b/commit-queue/workdir/chromium/PRESUBMIT.py
Running /b/commit-queue/workdir/chromium/chrome/PRESUBMIT.py
Running /b/commit-queue/workdir/chromium/chrome/browser/resources/PRESUBMIT.py

** Presubmit Messages **
See the JavaScript style guide at
http://www.chromium.org/developers/web-development-style-guide#TOC-JavaScript
and if you have any feedback about the JavaScript PRESUBMIT check, contact
tbreisacher@chromium.org or dbeam@chromium.org

** Presubmit Warnings **
Found JavaScript style violations in
chrome/browser/resources/file_manager/js/image_editor/image_transform.js:
  line 15: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.setUp'
ImageEditor.Mode.Crop.prototype.setUp = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 68: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.reset'
ImageEditor.Mode.Crop.prototype.reset = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 73: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.positionDOM'
ImageEditor.Mode.Crop.prototype.positionDOM = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 98: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.cleanUpUI'
ImageEditor.Mode.Crop.prototype.cleanUpUI = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 105: E0220: No docs found for member
'ImageEditor.Mode.Crop.MOUSE_GRAB_RADIUS'
ImageEditor.Mode.Crop.MOUSE_GRAB_RADIUS = 6;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 106: E0220: No docs found for member
'ImageEditor.Mode.Crop.TOUCH_GRAB_RADIUS'
ImageEditor.Mode.Crop.TOUCH_GRAB_RADIUS = 20;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 108: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.getCommand'
ImageEditor.Mode.Crop.prototype.getCommand = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 113: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.createDefaultCrop'
ImageEditor.Mode.Crop.prototype.createDefaultCrop = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 121: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.getCursorStyle'
ImageEditor.Mode.Crop.prototype.getCursorStyle = function(x, y, mouseDown) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 125: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.getDragHandler'
ImageEditor.Mode.Crop.prototype.getDragHandler = function(x, y, touch) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 137: E0220: No docs found for member
'ImageEditor.Mode.Crop.prototype.getDoubleTapAction'
ImageEditor.Mode.Crop.prototype.getDoubleTapAction = function(x, y) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 174: E0220: No docs found for member 'DraggableRect.LEFT'
DraggableRect.LEFT = 'left';
^^^^^^^^^^^^^^^^^^
  line 175: E0220: No docs found for member 'DraggableRect.RIGHT'
DraggableRect.RIGHT = 'right';
^^^^^^^^^^^^^^^^^^^
  line 176: E0220: No docs found for member 'DraggableRect.TOP'
DraggableRect.TOP = 'top';
^^^^^^^^^^^^^^^^^
  line 177: E0220: No docs found for member 'DraggableRect.BOTTOM'
DraggableRect.BOTTOM = 'bottom';
^^^^^^^^^^^^^^^^^^^^
  line 178: E0220: No docs found for member 'DraggableRect.NONE'
DraggableRect.NONE = 'none';
^^^^^^^^^^^^^^^^^^
  line 181: E0220: No docs found for member 'DraggableRect.prototype.getLeft'
DraggableRect.prototype.getLeft = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 186: E0220: No docs found for member 'DraggableRect.prototype.getRight'
DraggableRect.prototype.getRight = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 191: E0220: No docs found for member 'DraggableRect.prototype.getTop'
DraggableRect.prototype.getTop = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 196: E0220: No docs found for member 'DraggableRect.prototype.getBottom'
DraggableRect.prototype.getBottom = function() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 201: E0220: No docs found for member 'DraggableRect.prototype.getRect'
DraggableRect.prototype.getRect = function() { return new Rect(this.bounds_) };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 204: E0220: No docs found for member
'DraggableRect.prototype.getDragMode'
DraggableRect.prototype.getDragMode = function(x, y, touch) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 251: E0220: No docs found for member
'DraggableRect.prototype.getCursorStyle'
DraggableRect.prototype.getCursorStyle = function(x, y, mouseDown) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 264: E0220: No docs found for member
'DraggableRect.prototype.getDragHandler'
DraggableRect.prototype.getDragHandler = function(x, y, touch) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 358: E0220: No docs found for member
'DraggableRect.prototype.getDoubleTapAction'
DraggableRect.prototype.getDoubleTapAction = function(x, y, touch) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Found JavaScript style violations in
chrome/browser/resources/file_manager/js/metadata/byte_reader.js:
  line 14: Use var instead of const.
// Static const and methods.
          ^^^^^
  line 16: E0220: No docs found for member 'ByteReader.LITTLE_ENDIAN'
ByteReader.LITTLE_ENDIAN = 0;  // Intel, 0x1234 is [0x34, 0x12]
^^^^^^^^^^^^^^^^^^^^^^^^
  line 17: E0220: No docs found for member 'ByteReader.BIG_ENDIAN'
ByteReader.BIG_ENDIAN = 1;  // Motorola, 0x1234 is [0x12, 0x34]
^^^^^^^^^^^^^^^^^^^^^
  line 19: E0220: No docs found for member 'ByteReader.SEEK_BEG'
ByteReader.SEEK_BEG = 0;  // Seek relative to the beginning of the buffer.
^^^^^^^^^^^^^^^^^^^
  line 20: E0220: No docs found for member 'ByteReader.SEEK_CUR'
ByteReader.SEEK_CUR = 1;  // Seek relative to the current position.
^^^^^^^^^^^^^^^^^^^
  line 21: E0220: No docs found for member 'ByteReader.SEEK_END'
ByteReader.SEEK_END = 2;  // Seek relative to the end of the buffer.
^^^^^^^^^^^^^^^^^^^
  line 28: E0210: Missing docs for parameter: "pos"
ByteReader.validateRead = function(pos, size, end) {
                                                 ^^
  line 28: E0210: Missing docs for parameter: "size"
ByteReader.validateRead = function(pos, size, end) {
                                                 ^^
  line 28: E0210: Missing docs for parameter: "end"
ByteReader.validateRead = function(pos, size, end) {
                                                 ^^
  line 42: E0210: Missing docs for parameter: "dataView"
ByteReader.readString = function(dataView, pos, size, opt_end) {
                                                             ^^
  line 42: E0210: Missing docs for parameter: "pos"
ByteReader.readString = function(dataView, pos, size, opt_end) {
                                                             ^^
  line 42: E0210: Missing docs for parameter: "size"
ByteReader.readString = function(dataView, pos, size, opt_end) {
                                                             ^^
  line 42: E0210: Missing docs for parameter: "opt_end"
ByteReader.readString = function(dataView, pos, size, opt_end) {
                                                             ^^
  line 41: E0217: Missing @return JsDoc in function with non-trivial return
 */
 ^^
  line 59: E0210: Missing docs for parameter: "dataView"
ByteReader.readNullTerminatedString = function(dataView, pos, size, opt_end) {
                                                                           ^^
  line 59: E0210: Missing docs for parameter: "pos"
ByteReader.readNullTerminatedString = function(dataView, pos, size, opt_end) {
                                                                           ^^
  line 59: E0210: Missing docs for parameter: "size"
ByteReader.readNullTerminatedString = function(dataView, pos, size, opt_end) {
                                                                           ^^
  line 59: E0210: Missing docs for parameter: "opt_end"
ByteReader.readNullTerminatedString = function(dataView, pos, size, opt_end) {
                                                                           ^^
  line 58: E0217: Missing @return JsDoc in function with non-trivial return
 */
 ^^
  line 80: E0210: Missing docs for parameter: "dataView"
    dataView, pos, bom, size, opt_end) {
                                     ^^
  line 80: E0210: Missing docs for parameter: "pos"
    dataView, pos, bom, size, opt_end) {
                                     ^^
  line 80: E0210: Missing docs for parameter: "bom"
    dataView, pos, bom, size, opt_end) {
                                     ^^
  line 80: E0210: Missing docs for parameter: "size"
    dataView, pos, bom, size, opt_end) {
                                     ^^
  line 80: E0210: Missing docs for parameter: "opt_end"
    dataView, pos, bom, size, opt_end) {
                                     ^^
  line 78: E0217: Missing @return JsDoc in function with non-trivial return
 */
 ^^
  line 102: E0220: No docs found for member 'ByteReader.base64Alphabet_'
ByteReader.base64Alphabet_ =
^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 113: E0210: Missing docs for parameter: "dataView"
ByteReader.readBase64 = function(dataView, pos, size, opt_end) {
                                                             ^^
  line 113: E0210: Missing docs for parameter: "pos"
ByteReader.readBase64 = function(dataView, pos, size, opt_end) {
                                                             ^^
  line 113: E0210: Missing docs for parameter: "size"
ByteReader.readBase64 = function(dataView, pos, size, opt_end) {
                                                             ^^
  line 113: E0210: Missing docs for parameter: "opt_end"
ByteReader.readBase64 = function(dataView, pos, size, opt_end) {
                                                             ^^
  line 112: E0217: Missing @return JsDoc in function with non-trivial return
 */
 ^^
  line 157: E0210: Missing docs for parameter: "dataView"
ByteReader.readImage = …
(message too large)

Powered by Google App Engine
This is Rietveld 408576698