Skip to content

Commit

Permalink
fix: sonar complaints fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vadson71 committed Jan 9, 2024
1 parent dda44b7 commit d427fe2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/binding-parser/src/lexer/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const whiteSpace = createToken({
const specialChars = createToken({
name: SPECIAL_CHARS,
pattern:
/(?:#|&gt;|&#47;|&#x2F;|!|"|\$|%|&|'|\(|\)|\*|\+|-|\.|\/|;|<|=|>|\?|@|\\|\^|_|`|~|\||)+/,
/(?:#|&gt;|&#47;|&#x2F;|!|"|\$|%|&|'|\(|\)|\*|\+|-|\.|\/|;|<|=|>|\?|@|\\|\^|_|`|~|\|)+/,
});

const leftCurly = createToken({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ describe("binding parser", () => {
continue;
}
if (only.includes(t)) {
it.only(`${t}`, async () => {
const cb = async () => {
await testParser(t);
});
};
it.only(`${t}`, cb); // NOSONAR
continue;
}
it(`${t}`, async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/language-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ connection.onInitialize(
}
);

connection.onInitialized(async () => {
connection.onInitialized(async (): Promise<void> => {
getLogger().info("`onInitialized` event");
if (hasConfigurationCapability) {
// Register for all configuration changes
Expand Down Expand Up @@ -266,7 +266,7 @@ const validateOpenDocuments = async (changes: FileEvent[]): Promise<void> => {
}
};

connection.onDidChangeWatchedFiles(async (changeEvent) => {
connection.onDidChangeWatchedFiles(async (changeEvent): Promise<void> => {
getLogger().debug("`onDidChangeWatchedFiles` event", {
changeEvent,
});
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-ui5-language-assistant/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ export async function activate(context: ExtensionContext): Promise<void> {
client.start().then(() => {
client.onNotification(
"UI5LanguageAssistant/ui5Model",
async (model: UI5Model) => await updateCurrentModel(model)
async (model: UI5Model): Promise<void> => await updateCurrentModel(model)
);
client.onNotification(
"UI5LanguageAssistant/context-error",
async (error: Error) => await handleContextError(error)
(error: Error) => handleContextError(error)
);
});
window.onDidChangeActiveTextEditor(async () => {
Expand Down

0 comments on commit d427fe2

Please sign in to comment.