Skip to content

Commit 62ed9fc

Browse files
authored
fix: change syntax of comments to remove warning (#139)
warning concerned: 726:40: warning: '/*' within block comment [-Wcomment] - `{}` to group conditions (e.g. `**<U+200B>/*.{ts,js}` matches all TypeScript and JavaScript files)
1 parent 611f80c commit 62ed9fc

File tree

1 file changed

+42
-44
lines changed

1 file changed

+42
-44
lines changed

src/lsp/types.h

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -718,19 +718,18 @@ struct WorkDoneProgressOptions
718718
std::optional<bool> workDoneProgress;
719719
};
720720

721-
/*
722-
The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:
723-
- `*` to match one or more characters in a path segment
724-
- `?` to match on one character in a path segment
725-
- `**` to match any number of path segments, including none
726-
- `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
727-
- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`,
728-
`example.1`, …)
729-
- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`,
730-
`example.b`, but not `example.0`)
721+
// The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:
722+
// - `*` to match one or more characters in a path segment
723+
// - `?` to match on one character in a path segment
724+
// - `**` to match any number of path segments, including none
725+
// - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
726+
// - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`,
727+
// `example.1`, …)
728+
// - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on
729+
// `example.a`, `example.b`, but not `example.0`)
730+
731+
// @since 3.17.0
731732

732-
@since 3.17.0
733-
*/
734733
using Pattern = std::string;
735734

736735
struct FoldingRange
@@ -2421,26 +2420,25 @@ Note that markdown strings will be sanitized - that means html will be escaped.
24212420
*/
24222421
using MarkedString = std::variant<std::string, MarkedStringFull>;
24232422

2424-
/*
2425-
A document filter denotes a document by different properties like
2426-
the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
2427-
its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName).
2428-
2429-
Glob patterns can have the following syntax:
2430-
- `*` to match one or more characters in a path segment
2431-
- `?` to match on one character in a path segment
2432-
- `**` to match any number of path segments, including none
2433-
- `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
2434-
- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`,
2435-
`example.1`, …)
2436-
- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`,
2437-
`example.b`, but not `example.0`)
2438-
2439-
@sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
2440-
@sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
2441-
2442-
@since 3.17.0
2443-
*/
2423+
// A document filter denotes a document by different properties like
2424+
// the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
2425+
// its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName).
2426+
2427+
// Glob patterns can have the following syntax:
2428+
// - `*` to match one or more characters in a path segment
2429+
// - `?` to match on one character in a path segment
2430+
// - `**` to match any number of path segments, including none
2431+
// - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript
2432+
// files)
2433+
// - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`,
2434+
// `example.1`, …)
2435+
// - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on
2436+
// `example.a`, `example.b`, but not `example.0`)
2437+
2438+
// @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
2439+
// @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
2440+
2441+
// @since 3.17.0
24442442
using TextDocumentFilter = std::variant<TextDocumentFilter_1, TextDocumentFilter_2, TextDocumentFilter_3>;
24452443

24462444
struct ConfigurationParams
@@ -3050,18 +3048,18 @@ struct WorkspaceUnchangedDocumentDiagnosticReport : public UnchangedDocumentDiag
30503048

30513049
struct FileOperationPattern
30523050
{
3053-
/*
3054-
The glob pattern to match. Glob patterns can have the following syntax:
3055-
- `*` to match one or more characters in a path segment
3056-
- `?` to match on one character in a path segment
3057-
- `**` to match any number of path segments, including none
3058-
- `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript
3059-
files)
3060-
- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`,
3061-
`example.1`, …)
3062-
- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on
3063-
`example.a`, `example.b`, but not `example.0`)
3064-
*/
3051+
3052+
// The glob pattern to match. Glob patterns can have the following syntax:
3053+
// - `*` to match one or more characters in a path segment
3054+
// - `?` to match on one character in a path segment
3055+
// - `**` to match any number of path segments, including none
3056+
// - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript
3057+
// files)
3058+
// - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on
3059+
// `example.0`, `example.1`, …)
3060+
// - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on
3061+
// `example.a`, `example.b`, but not `example.0`)
3062+
30653063
std::string glob;
30663064
/*
30673065
Whether to match files or folders with this pattern.

0 commit comments

Comments
 (0)