Merge pull request #2664 from yurydelendik/jshint-gjslint
Enforces maxlen and quotmark for jshint target
This commit is contained in:
commit
3699c311bb
@ -6,6 +6,8 @@
|
|||||||
"worker": true,
|
"worker": true,
|
||||||
|
|
||||||
// Enforcing
|
// Enforcing
|
||||||
|
"maxlen": 80,
|
||||||
|
"quotmark": "single",
|
||||||
|
|
||||||
// Relaxing
|
// Relaxing
|
||||||
"boss": true,
|
"boss": true,
|
||||||
|
28
make.js
28
make.js
@ -1,7 +1,22 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
|
/* Copyright 2012 Mozilla Foundation
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
/* jshint node:true */
|
/* jshint node:true */
|
||||||
/* globals cat, cd, cp, echo, env, exec, exit, find, ls, mkdir, mv, process, rm, sed, target, test */
|
/* globals cat, cd, cp, echo, env, exec, exit, find, ls, mkdir, mv, process, rm,
|
||||||
|
sed, target, test */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -46,7 +61,7 @@ target.all = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Production stuff
|
// Production stuff
|
||||||
//
|
//
|
||||||
@ -267,7 +282,7 @@ target.bundle = function() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Extension stuff
|
// Extension stuff
|
||||||
//
|
//
|
||||||
@ -657,7 +672,7 @@ target.chrome = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Test stuff
|
// Test stuff
|
||||||
//
|
//
|
||||||
@ -933,7 +948,7 @@ target.mozcentralcheck = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Other
|
// Other
|
||||||
//
|
//
|
||||||
@ -997,7 +1012,8 @@ target.jshint = function() {
|
|||||||
//'extensions/chrome/*.js'
|
//'extensions/chrome/*.js'
|
||||||
];
|
];
|
||||||
|
|
||||||
exit(exec('./node_modules/.bin/jshint --reporter test/reporter.js ' + LINT_FILES.join(' ')).code);
|
exit(exec('./node_modules/.bin/jshint --reporter test/reporter.js ' +
|
||||||
|
LINT_FILES.join(' ')).code);
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals CanvasGraphics, combineUrl, createScratchCanvas, error, ErrorFont, Font, FontLoader, globalScope, info, isArrayBuffer, loadJpegStream, MessageHandler, PDFJS, PDFObjects, Promise, StatTimer, warn, WorkerMessageHandler */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals CanvasGraphics, combineUrl, createScratchCanvas, error, ErrorFont,
|
||||||
|
Font, FontLoader, globalScope, info, isArrayBuffer, loadJpegStream,
|
||||||
|
MessageHandler, PDFJS, PDFObjects, Promise, StatTimer, warn,
|
||||||
|
WorkerMessageHandler */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals ColorSpace, DeviceCmykCS, DeviceGrayCS, DeviceRgbCS, error, FONT_IDENTITY_MATRIX, IDENTITY_MATRIX, ImageData, isArray, isNum, isString, Pattern, TilingPattern, TODO, Util, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals ColorSpace, DeviceCmykCS, DeviceGrayCS, DeviceRgbCS, error,
|
||||||
|
FONT_IDENTITY_MATRIX, IDENTITY_MATRIX, ImageData, isArray, isNum,
|
||||||
|
isString, Pattern, TilingPattern, TODO, Util, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals error, info, input, isArray, isDict, isName, isStream, isString, PDFFunction, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals error, info, input, isArray, isDict, isName, isStream, isString,
|
||||||
|
PDFFunction, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals assertWellFormed, calculateMD5, Catalog, error, info, isArray, isArrayBuffer, isDict, isName, isStream, isString, Lexer, Linearization, NullStream, PartialEvaluator, shadow, Stream, StreamsSequenceStream, stringToPDFString, TODO, Util, warn, XRef */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals assertWellFormed, calculateMD5, Catalog, error, info, isArray,
|
||||||
|
isArrayBuffer, isDict, isName, isStream, isString, Lexer,
|
||||||
|
Linearization, NullStream, PartialEvaluator, shadow, Stream,
|
||||||
|
StreamsSequenceStream, stringToPDFString, TODO, Util, warn, XRef */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals bytesToString, DecryptStream, error, isInt, isName, Name, PasswordException, stringToBytes */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals bytesToString, DecryptStream, error, isInt, isName, Name,
|
||||||
|
PasswordException, stringToBytes */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals assert, assertWellFormed, ColorSpace, Dict, Encodings, error, ErrorFont, Font, FONT_IDENTITY_MATRIX, fontCharsToUnicode, FontFlags, IDENTITY_MATRIX, info, isArray, isCmd, isDict, isEOF, isName, isNum, isStream, isString, JpegStream, Lexer, Metrics, Name, Parser, Pattern, PDFImage, PDFJS, serifFonts, stdFontMap, symbolsFonts, TilingPattern, TODO, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals assert, assertWellFormed, ColorSpace, Dict, Encodings, error,
|
||||||
|
ErrorFont, Font, FONT_IDENTITY_MATRIX, fontCharsToUnicode, FontFlags,
|
||||||
|
IDENTITY_MATRIX, info, isArray, isCmd, isDict, isEOF, isName, isNum,
|
||||||
|
isStream, isString, JpegStream, Lexer, Metrics, Name, Parser,
|
||||||
|
Pattern, PDFImage, PDFJS, serifFonts, stdFontMap, symbolsFonts,
|
||||||
|
TilingPattern, TODO, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -729,7 +734,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||||||
case 'Tj':
|
case 'Tj':
|
||||||
chunk += fontCharsToUnicode(args[0], font);
|
chunk += fontCharsToUnicode(args[0], font);
|
||||||
break;
|
break;
|
||||||
case "'":
|
case '\'':
|
||||||
// For search, adding a extra white space for line breaks would be
|
// For search, adding a extra white space for line breaks would be
|
||||||
// better here, but that causes too much spaces in the
|
// better here, but that causes too much spaces in the
|
||||||
// text-selection divs.
|
// text-selection divs.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals assert, bytesToString, CIDToUnicodeMaps, error, ExpertCharset, ExpertSubsetCharset, FileReaderSync, globalScope, GlyphsUnicode, info, isArray, isNum, ISOAdobeCharset, isWorker, PDFJS, Stream, stringToBytes, TextDecoder, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals assert, bytesToString, CIDToUnicodeMaps, error, ExpertCharset,
|
||||||
|
ExpertSubsetCharset, FileReaderSync, globalScope, GlyphsUnicode,
|
||||||
|
info, isArray, isNum, ISOAdobeCharset, isWorker, PDFJS, Stream,
|
||||||
|
stringToBytes, TextDecoder, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -4309,7 +4312,7 @@ var Font = (function FontClosure() {
|
|||||||
// Add the font-face rule to the document
|
// Add the font-face rule to the document
|
||||||
var url = ('url(data:' + this.mimetype + ';base64,' +
|
var url = ('url(data:' + this.mimetype + ';base64,' +
|
||||||
window.btoa(data) + ');');
|
window.btoa(data) + ');');
|
||||||
var rule = "@font-face { font-family:'" + fontName + "';src:" + url + '}';
|
var rule = '@font-face { font-family:"' + fontName + '";src:' + url + '}';
|
||||||
|
|
||||||
var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
|
var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
|
||||||
if (!styleElement) {
|
if (!styleElement) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals ColorSpace, error, isArray, isStream, JpegStream, Name, Promise, Stream, TODO, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals ColorSpace, error, isArray, isStream, JpegStream, Name, Promise,
|
||||||
|
Stream, TODO, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals error, globalScope, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals error, globalScope, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals assertWellFormed, bytesToString, CipherTransformFactory, error, info, InvalidPDFException, isArray, isCmd, isDict, isInt, isName, isRef, isStream, JpegStream, Lexer, log, Page, Parser, Promise, shadow, stringToPDFString, stringToUTF8String, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals assertWellFormed, bytesToString, CipherTransformFactory, error, info,
|
||||||
|
InvalidPDFException, isArray, isCmd, isDict, isInt, isName, isRef,
|
||||||
|
isStream, JpegStream, Lexer, log, Page, Parser, Promise, shadow,
|
||||||
|
stringToPDFString, stringToUTF8String, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals Ascii85Stream, AsciiHexStream, CCITTFaxStream, Cmd, Dict, error, FlateStream, isArray, isCmd, isDict, isInt, isName, isNum, isRef, isString, Jbig2Stream, JpegStream, JpxStream, LZWStream, Name, NullStream, PredictorStream, Ref, RunLengthStream, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals Ascii85Stream, AsciiHexStream, CCITTFaxStream, Cmd, Dict, error,
|
||||||
|
FlateStream, isArray, isCmd, isDict, isInt, isName, isNum, isRef,
|
||||||
|
isString, Jbig2Stream, JpegStream, JpxStream, LZWStream, Name,
|
||||||
|
NullStream, PredictorStream, Ref, RunLengthStream, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -134,7 +137,8 @@ var Parser = (function ParserClosure() {
|
|||||||
|
|
||||||
// searching for the /EI\s/
|
// searching for the /EI\s/
|
||||||
var state = 0, ch;
|
var state = 0, ch;
|
||||||
while (state != 4 && (ch = stream.getByte()) !== null && ch !== undefined) {
|
while (state != 4 &&
|
||||||
|
(ch = stream.getByte()) !== null && ch !== undefined) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 0x20:
|
case 0x20:
|
||||||
case 0x0D:
|
case 0x0D:
|
||||||
@ -477,13 +481,13 @@ var Lexer = (function LexerClosure() {
|
|||||||
if (isFirstHex) {
|
if (isFirstHex) {
|
||||||
firstDigit = toHexDigit(ch);
|
firstDigit = toHexDigit(ch);
|
||||||
if (firstDigit === -1) {
|
if (firstDigit === -1) {
|
||||||
warn("Ignoring invalid character '" + ch + "' in hex string");
|
warn('Ignoring invalid character "' + ch + '" in hex string');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
secondDigit = toHexDigit(ch);
|
secondDigit = toHexDigit(ch);
|
||||||
if (secondDigit === -1) {
|
if (secondDigit === -1) {
|
||||||
warn("Ignoring invalid character '" + ch + "' in hex string");
|
warn('Ignoring invalid character "' + ch + '" in hex string');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
str += String.fromCharCode((firstDigit << 4) | secondDigit);
|
str += String.fromCharCode((firstDigit << 4) | secondDigit);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals CanvasGraphics, ColorSpace, createScratchCanvas, DeviceRgbCS, error, info, isArray, isPDFFunction, isStream, PDFFunction, TODO, Util, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals CanvasGraphics, ColorSpace, createScratchCanvas, DeviceRgbCS, error,
|
||||||
|
info, isArray, isPDFFunction, isStream, PDFFunction, TODO, Util,
|
||||||
|
warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals bytesToString, ColorSpace, Dict, EOF, error, info, Jbig2Image, JpegImage, JpxImage, Lexer */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals bytesToString, ColorSpace, Dict, EOF, error, info, Jbig2Image,
|
||||||
|
JpegImage, JpxImage, Lexer */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals Cmd, DeviceCmykCS, Dict, globalScope, INFOS, MozBlobBuilder, Name, PDFJS, Ref, WARNINGS, verbosity */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals Cmd, DeviceCmykCS, Dict, globalScope, INFOS, MozBlobBuilder, Name,
|
||||||
|
PDFJS, Ref, WARNINGS, verbosity */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -469,11 +470,13 @@ function isArray(v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isStream(v) {
|
function isStream(v) {
|
||||||
return typeof v == 'object' && v !== null && v !== undefined && ('getChar' in v);
|
return typeof v == 'object' && v !== null && v !== undefined &&
|
||||||
|
('getChar' in v);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isArrayBuffer(v) {
|
function isArrayBuffer(v) {
|
||||||
return typeof v == 'object' && v !== null && v !== undefined && ('byteLength' in v);
|
return typeof v == 'object' && v !== null && v !== undefined &&
|
||||||
|
('byteLength' in v);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isRef(v) {
|
function isRef(v) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals CFFDictDataMap, CFFDictPrivateDataMap, CFFEncodingMap, CFFStrings, Components, Dict, dump, error, isNum, log, netscape, Stream, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals CFFDictDataMap, CFFDictPrivateDataMap, CFFEncodingMap, CFFStrings,
|
||||||
|
Components, Dict, dump, error, isNum, log, netscape, Stream, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
/* globals CanvasGraphics, error, globalScope, InvalidPDFException, log, MissingPDFException, PasswordException, PDFDocument, PDFJS, Promise, Stream, UnknownErrorException, warn */
|
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -15,6 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* globals CanvasGraphics, error, globalScope, InvalidPDFException, log,
|
||||||
|
MissingPDFException, PasswordException, PDFDocument, PDFJS, Promise,
|
||||||
|
Stream, UnknownErrorException, warn */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,28 +1,45 @@
|
|||||||
"use strict";
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
|
/* Copyright 2012 Mozilla Foundation
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
reporter: function (res) {
|
reporter: function reporter(res) {
|
||||||
var len = 0;
|
var len = 0;
|
||||||
var str = "";
|
var str = '';
|
||||||
|
|
||||||
res.forEach(function (r) {
|
res.forEach(function(r) {
|
||||||
var file = r.file;
|
var file = r.file;
|
||||||
var err = r.error;
|
var err = r.error;
|
||||||
|
|
||||||
switch(err.code) {
|
switch (err.code) {
|
||||||
case 'W004': // variable is already defined
|
case 'W004': // variable is already defined
|
||||||
case 'W018': // confusing use of !
|
case 'W018': // confusing use of !
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
len++;
|
len++;
|
||||||
str += file + ": line " + err.line + ", col " +
|
str += file + ': line ' + err.line + ', col ' +
|
||||||
err.character + ", " + err.reason + "\n";
|
err.character + ', ' + err.reason + '\n';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (str) {
|
if (str) {
|
||||||
process.stdout.write(str + "\n" + len + " error" +
|
process.stdout.write(str + '\n' + len + ' error' +
|
||||||
((len === 1) ? "" : "s") + "\n");
|
((len === 1) ? '' : 's') + '\n');
|
||||||
process.exit(2);
|
process.exit(2);
|
||||||
} else {
|
} else {
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user