# False positive in rule typescript:S7749 ("Invalid group length in numeric value")

**URL:** <https://community.sonarsource.com/t/false-positive-in-rule-typescript-s7749-invalid-group-length-in-numeric-value/149768>\
**Category:** Report False-positive / False-negative...\
**Tags:** typescript\
**Created:** [October 2, 2025, 2:02pm UTC](https://community.sonarsource.com/t/false-positive-in-rule-typescript-s7749-invalid-group-length-in-numeric-value/149768 "2025-10-02T14:02:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thilo](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/thilo/32/61508_2.png) [@Thilo](https://community.sonarsource.com/u/Thilo)\
**Post date:** [October 2, 2025, 2:02pm UTC](https://community.sonarsource.com/t/false-positive-in-rule-typescript-s7749-invalid-group-length-in-numeric-value/149768/1 "2025-10-02T14:02:17Z")

</div>

I am using SonarCloud to analyze several repositories containing TypeScript code.

Apparently on 2025-09-22 the _typescript:S7749_ rule (“Numeric literals should use consistent digit grouping with separators”) was added to the built-in “Sonar way” quality profile. Since then this rule has triggered lots of false positives in many TypeScript files which use an underscore character “\_” to format numeric literals. Here is an example code snippet:

> expect(DEFAULT\_BATCH\_CONFIG).toEqual({  
> delayBetweenBatches: 1\_000  
> })

SonarCloud raises a warning about the “delayBetweenBatches: 1\_000”:

> Invalid group length in numeric value.  
> Numeric literals should use consistent digit grouping with separators typescript:S7749  
> Software qualities impacted: Maintainability Low

The same happens for dozens of other numbers which in my opinion all are correctly formatted using an underscore separator between thousand groups (e.g. `5_000` and `10_000`). Several colleagues double-checked and confirmed that these numbers look just fine and that apparently this rule is causing false positive alerts.

Could someone please confirm if there is indeed a bug in this rule? If so, could it please be fixed? 🙂

---

<div class="post-metadata">

**Author:** ![victor.diez](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/victor.diez/32/38525_2.png) [@victor.diez](https://community.sonarsource.com/u/victor.diez)\
**Post date:** [October 3, 2025, 3:32pm UTC](https://community.sonarsource.com/t/false-positive-in-rule-typescript-s7749-invalid-group-length-in-numeric-value/149768/3 "2025-10-03T15:32:14Z")

</div>

Hello @Thilo,

could you please provide a file which raised an issue in this file? We have not been able to spot these FPs.

---

<div class="post-metadata">

**Author:** ![Thilo](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/thilo/32/61508_2.png) [@Thilo](https://community.sonarsource.com/u/Thilo)\
**Post date:** [October 7, 2025, 10:50am UTC](https://community.sonarsource.com/t/false-positive-in-rule-typescript-s7749-invalid-group-length-in-numeric-value/149768/5 "2025-10-07T10:50:56Z")

</div>

Hello Victor,

Thanks for your reply. Here is an example repository: [GitHub - markupai/content-guardian-action](https://github.com/markupai/content-guardian-action)

The SonarCloud analysis for the main branch currently shows 21 issues for the “Invalid group length in numeric value (typescript:S7749)” rule, all of them false positives in my opinion.

Here are three concrete examples:

> <https://github.com/markupai/content-guardian-action/blob/main/src/utils/error-utils.ts#L22>

> <https://github.com/markupai/content-guardian-action/blob/main/src/services/api-service.ts#L112>

> <https://github.com/markupai/content-guardian-action/blob/main/ __tests__ /error-utils.test.ts#L95>

Please let me know if you need more examples or information to reproduce the problem.

---

<div class="post-metadata">

**Author:** ![victor.diez](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/victor.diez/32/38525_2.png) [@victor.diez](https://community.sonarsource.com/u/victor.diez)\
**Post date:** [October 9, 2025, 12:03pm UTC](https://community.sonarsource.com/t/false-positive-in-rule-typescript-s7749-invalid-group-length-in-numeric-value/149768/6 "2025-10-09T12:03:03Z")

</div>

Hi @Thilo,

thanks for the samples. We have now a [fix](https://github.com/SonarSource/SonarJS/pull/5810) that should land in the next release of the JS/TS analyzer.
