Skip to content

Commit

Permalink
Reduce unused exports
Browse files Browse the repository at this point in the history
Addresses #164939
  • Loading branch information
andreamah committed Dec 13, 2022
1 parent ede5bde commit 149695e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/search/browser/searchWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { showHistoryKeybindingHint } from 'vs/platform/history/browser/historyWi
import { defaultInputBoxStyles, defaultToggleStyles } from 'vs/platform/theme/browser/defaultStyles';

/** Specified in searchview.css */
export const SingleLineInputHeight = 24;
const SingleLineInputHeight = 24;

export interface ISearchWidgetOptions {
value?: string;
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/services/search/common/fileSearchManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ import { URI } from 'vs/base/common/uri';
import { IFileMatch, IFileSearchProviderStats, IFolderQuery, ISearchCompleteStats, IFileQuery, QueryGlobTester, resolvePatternsForProvider, hasSiblingFn } from 'vs/workbench/services/search/common/search';
import { FileSearchProvider, FileSearchOptions } from 'vs/workbench/services/search/common/searchExtTypes';

export interface IInternalFileMatch {
interface IInternalFileMatch {
base: URI;
original?: URI;
relativePath?: string; // Not present for extraFiles or absolute path matches
basename: string;
size?: number;
}

export interface IDirectoryEntry {
interface IDirectoryEntry {
base: URI;
relativePath: string;
basename: string;
}

export interface IDirectoryTree {
interface IDirectoryTree {
rootEntries: IDirectoryEntry[];
pathToEntries: { [relativePath: string]: IDirectoryEntry[] };
}
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/services/search/common/queryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { getExcludes, ICommonQueryProps, IFileQuery, IFolderQuery, IPatternInfo,
/**
* One folder to search and a glob expression that should be applied.
*/
export interface IOneSearchPathPattern {
interface IOneSearchPathPattern {
searchPath: uri;
pattern?: string;
}
Expand All @@ -47,7 +47,7 @@ export interface ISearchPathsInfo {
pattern?: glob.IExpression;
}

export interface ICommonQueryBuilderOptions {
interface ICommonQueryBuilderOptions {
_reason?: string;
excludePattern?: string | string[];
includePattern?: string | string[];
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/services/search/node/fileSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ class AbsoluteAndRelativeParsedExpression {
}
}

export function rgErrorMsgForDisplay(msg: string): string | undefined {
function rgErrorMsgForDisplay(msg: string): string | undefined {
const lines = msg.trim().split('\n');
const firstLine = lines[0].trim();

Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/services/search/node/rawSearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Engine as FileSearchEngine } from 'vs/workbench/services/search/node/fi
import { TextSearchEngineAdapter } from 'vs/workbench/services/search/node/textSearchAdapter';

export type IProgressCallback = (p: ISerializedSearchProgressItem) => void;
export type IFileProgressCallback = (p: IFileSearchProgressItem) => void;
type IFileProgressCallback = (p: IFileSearchProgressItem) => void;

export class SearchService implements IRawSearchService {

Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/services/search/node/ripgrepFileSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ function getRgArgs(config: IFileQuery, folderQuery: IFolderQuery, includePattern
};
}

export interface IRgGlobResult {
interface IRgGlobResult {
globArgs: string[];
siblingClauses: glob.IExpression;
}

export function foldersToRgExcludeGlobs(folderQueries: IFolderQuery[], globalExclude?: glob.IExpression, excludesToSkip?: Set<string>, absoluteGlobs = true): IRgGlobResult {
function foldersToRgExcludeGlobs(folderQueries: IFolderQuery[], globalExclude?: glob.IExpression, excludesToSkip?: Set<string>, absoluteGlobs = true): IRgGlobResult {
const globArgs: string[] = [];
let siblingClauses: glob.IExpression = {};
folderQueries.forEach(folderQuery => {
Expand All @@ -102,7 +102,7 @@ export function foldersToRgExcludeGlobs(folderQueries: IFolderQuery[], globalExc
return { globArgs, siblingClauses };
}

export function foldersToIncludeGlobs(folderQueries: IFolderQuery[], globalInclude?: glob.IExpression, absoluteGlobs = true): string[] {
function foldersToIncludeGlobs(folderQueries: IFolderQuery[], globalInclude?: glob.IExpression, absoluteGlobs = true): string[] {
const globArgs: string[] = [];
folderQueries.forEach(folderQuery => {
const totalIncludePattern = Object.assign({}, globalInclude || {}, folderQuery.includePattern || {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class RipgrepTextSearchEngine {
* Ripgrep produces stderr output which is not from a fatal error, and we only want the search to be
* "failed" when a fatal error was produced.
*/
export function rgErrorMsgForDisplay(msg: string): Maybe<SearchError> {
function rgErrorMsgForDisplay(msg: string): Maybe<SearchError> {
const lines = msg.split('\n');
const firstLine = lines[0].trim();

Expand Down Expand Up @@ -161,7 +161,7 @@ export function rgErrorMsgForDisplay(msg: string): Maybe<SearchError> {
return undefined;
}

export function buildRegexParseError(lines: string[]): string {
function buildRegexParseError(lines: string[]): string {
const errorMessage: string[] = ['Regex parse error'];
const pcre2ErrorLine = lines.filter(l => (l.startsWith('PCRE2:')));
if (pcre2ErrorLine.length >= 1) {
Expand Down Expand Up @@ -495,7 +495,7 @@ function getRgArgs(query: TextSearchQuery, options: TextSearchOptions): string[]
/**
* `"foo/*bar/something"` -> `["foo", "foo/*bar", "foo/*bar/something", "foo/*bar/something/**"]`
*/
export function spreadGlobComponents(globArg: string): string[] {
function spreadGlobComponents(globArg: string): string[] {
const components = splitGlobAware(globArg, '/');
return components.map((_, i) => components.slice(0, i + 1).join('/'));
}
Expand Down

0 comments on commit 149695e

Please sign in to comment.