Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVS-1435 Support C Language standard flags #5665

Merged

Conversation

AbbasNS
Copy link
Contributor

@AbbasNS AbbasNS commented Sep 2, 2024

Copy link

sonarqubecloud bot commented Sep 2, 2024

@AbbasNS
Copy link
Contributor Author

AbbasNS commented Sep 2, 2024

I did a manual test using this code snipped to make sure we start to take the C standard into consideration.
Even though this PR can be merged before the CFamily upgrade to 6.58, this specific test requires CFamily 6.58 to notice the difference in behavior.

// * Raises only c:S820 with /std:c17
// * Raises only c:2260 with /std:clatest
implicit_int;

S2260 needs to be enabled in the settings.json:

{
  "sonarlint.rules": {
    "c:S2260": {
      "level": "On"
    }
  }
}

The option can be changed in the language standard of the file:
image

@georgii-borovinskikh-sonarsource georgii-borovinskikh-sonarsource changed the base branch from master to feature/hardening-sept-2024 September 3, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants