Skip to content

Commit

Permalink
Merge pull request #2830 from guwirth/gcc-addDeprecatedRuleKey
Browse files Browse the repository at this point in the history
add deprecated rule keys for gcc
  • Loading branch information
guwirth authored Dec 9, 2024
2 parents f75e8ea + a0ff361 commit dd67a0a
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,24 @@ public CxxCompilerGccRuleRepository(ServerFileSystem fileSystem, RulesDefinition
super(fileSystem, xmlRuleLoader, LANGUAGE, KEY, NAME, FILE);
}

@Override
public void prepareRule(NewRule rule) {
switch (rule.key()) {
case "-Wc++11-compat":
rule.addDeprecatedRuleKey(KEY, "-Wc++0x-compat");
break;
case "-Wc++17-compat":
rule.addDeprecatedRuleKey(KEY, "-Wc++1z-compat");
break;
case "-Wc11-c23-compat":
rule.addDeprecatedRuleKey(KEY, "-Wc11-c2x-compat");
break;
case "-Wsuggest-attribute=format":
rule.addDeprecatedRuleKey(KEY, "-Wmissing-format-attribute");
break;
case "-Wsuggest-attribute=noreturn":
rule.addDeprecatedRuleKey(KEY, "-Wmissing-noreturn");
break;
}
}
}

0 comments on commit dd67a0a

Please sign in to comment.