Skip to content

Commit 35eae99

Browse files
committed
Fix more lgtm.com issues
1 parent 41a6e73 commit 35eae99

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

extensions/emmet/src/abbreviationActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import * as vscode from 'vscode';
77
import { Node, HtmlNode, Rule, Property, Stylesheet } from 'EmmetNode';
88
import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, validate, getEmmetConfiguration, isStyleSheet, getEmmetMode, parsePartialStylesheet, isStyleAttribute, getEmbeddedCssNodeIfAny, allowedMimeTypesInScriptTag } from './util';
99

10-
const trimRegex = /[\u00a0]*[\d|#|\-|\*|\u2022]+\.?/;
11-
const hexColorRegex = /^#[\d,a-f,A-F]{0,6}$/;
10+
const trimRegex = /[\u00a0]*[\d#\-\*\u2022]+\.?/;
11+
const hexColorRegex = /^#[\da-fA-F]{0,6}$/;
1212
const inlineElements = ['a', 'abbr', 'acronym', 'applet', 'b', 'basefont', 'bdo',
1313
'big', 'br', 'button', 'cite', 'code', 'del', 'dfn', 'em', 'font', 'i',
1414
'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'map', 'object', 'q',

src/vs/base/common/assert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Throws an error with the provided message if the provided value does not evaluate to a true Javascript value.
88
*/
99
export function ok(value?: any, message?: string) {
10-
if (!value || value === null) {
10+
if (!value) {
1111
throw new Error(message ? 'Assertion failed (' + message + ')' : 'Assertion Failed');
1212
}
1313
}

src/vs/base/common/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export function isFunction(obj: any): obj is Function {
124124
* @returns whether the provided parameters is are JavaScript Function or not.
125125
*/
126126
export function areFunctions(...objects: any[]): boolean {
127-
return objects && objects.length > 0 && objects.every(isFunction);
127+
return objects.length > 0 && objects.every(isFunction);
128128
}
129129

130130
export type TypeConstraint = string | Function;

src/vs/workbench/parts/search/browser/openAnythingHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class OpenAnythingHandler extends QuickOpenHandler {
3232

3333
static readonly ID = 'workbench.picker.anything';
3434

35-
private static readonly LINE_COLON_PATTERN = /[#|:|\(](\d*)([#|:|,](\d*))?\)?$/;
35+
private static readonly LINE_COLON_PATTERN = /[#:\(](\d*)([#:,](\d*))?\)?$/;
3636

3737
private static readonly TYPING_SEARCH_DELAY = 200; // This delay accommodates for the user typing a word and then stops typing to start searching
3838

0 commit comments

Comments
 (0)