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

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/check_gn.js

Issue 2929163002: DevTools: add use strict in check gn (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 'use strict';
4 5
5 const fs = require('fs'); 6 const fs = require('fs');
6 const path = require('path'); 7 const path = require('path');
7 8
8 const inspectorManifest = require('../front_end/inspector.json'); 9 const inspectorManifest = require('../front_end/inspector.json');
9 const utils = require('./utils'); 10 const utils = require('./utils');
10 11
11 const gnPath = path.resolve(__dirname, '..', 'BUILD.gn'); 12 const gnPath = path.resolve(__dirname, '..', 'BUILD.gn');
12 const gnFile = fs.readFileSync(gnPath, 'utf-8'); 13 const gnFile = fs.readFileSync(gnPath, 'utf-8');
13 const gnLines = gnFile.split('\n'); 14 const gnLines = gnFile.split('\n');
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 function selectGNLines(startLine, endLine) { 57 function selectGNLines(startLine, endLine) {
57 let lines = gnLines.map(line => line.trim()); 58 let lines = gnLines.map(line => line.trim());
58 let startIndex = lines.indexOf(startLine); 59 let startIndex = lines.indexOf(startLine);
59 if (startIndex === -1) 60 if (startIndex === -1)
60 return []; 61 return [];
61 let endIndex = lines.indexOf(endLine, startIndex); 62 let endIndex = lines.indexOf(endLine, startIndex);
62 if (endIndex === -1) 63 if (endIndex === -1)
63 return []; 64 return [];
64 return lines.slice(startIndex + 1, endIndex); 65 return lines.slice(startIndex + 1, endIndex);
65 } 66 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698