Skip to content

Avoid regex backtracking in runtime translation

765a126
Select commit
Loading
Failed to load commit list.
Open

Add Cloudflare AI runtime translations for marketing pages #556

Avoid regex backtracking in runtime translation
765a126
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Apr 6, 2026 in 40s

Annotations

Check warning on line 39 in src/middleware.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This assertion is unnecessary since it does not change the type of the expression.

See more on https://sonarcloud.io/project/issues?id=Cap-go_website&issues=AZ1icDhSlZMhgCvZc8mj&open=AZ1icDhSlZMhgCvZc8mj&pullRequest=556

Check warning on line 28 in astro.config.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=Cap-go_website&issues=AZ1icDh2lZMhgCvZc8mk&open=AZ1icDh2lZMhgCvZc8mk&pullRequest=556

Check warning on line 283 in src/services/runtimeTranslation.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer using an optional chain expression instead, as it's more concise and easier to read.

See more on https://sonarcloud.io/project/issues?id=Cap-go_website&issues=AZ1icDeplZMhgCvZc8mi&open=AZ1icDeplZMhgCvZc8mi&pullRequest=556

Check failure on line 281 in src/services/runtimeTranslation.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Cap-go_website&issues=AZ1icDeplZMhgCvZc8mh&open=AZ1icDeplZMhgCvZc8mh&pullRequest=556

Check warning on line 135 in src/services/runtimeTranslation.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.findLast(…)` over `.filter(…).at(-1)`.

See more on https://sonarcloud.io/project/issues?id=Cap-go_website&issues=AZ1icDeplZMhgCvZc8mf&open=AZ1icDeplZMhgCvZc8mf&pullRequest=556

Check warning on line 86 in src/services/runtimeTranslation.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=Cap-go_website&issues=AZ1icDeplZMhgCvZc8me&open=AZ1icDeplZMhgCvZc8me&pullRequest=556