diff --git a/its/ruling/src/test/expected/jsts/courselit/javascript-S6855.json b/its/ruling/src/test/expected/jsts/courselit/javascript-S4084.json similarity index 100% rename from its/ruling/src/test/expected/jsts/courselit/javascript-S6855.json rename to its/ruling/src/test/expected/jsts/courselit/javascript-S4084.json diff --git a/its/ruling/src/test/expected/jsts/courselit/typescript-S6855.json b/its/ruling/src/test/expected/jsts/courselit/typescript-S4084.json similarity index 100% rename from its/ruling/src/test/expected/jsts/courselit/typescript-S6855.json rename to its/ruling/src/test/expected/jsts/courselit/typescript-S4084.json diff --git a/its/ruling/src/test/expected/jsts/moose/typescript-S6855.json b/its/ruling/src/test/expected/jsts/moose/typescript-S4084.json similarity index 100% rename from its/ruling/src/test/expected/jsts/moose/typescript-S6855.json rename to its/ruling/src/test/expected/jsts/moose/typescript-S4084.json diff --git a/its/ruling/src/test/expected/jsts/react-cloud-music/javascript-S6855.json b/its/ruling/src/test/expected/jsts/react-cloud-music/javascript-S4084.json similarity index 100% rename from its/ruling/src/test/expected/jsts/react-cloud-music/javascript-S6855.json rename to its/ruling/src/test/expected/jsts/react-cloud-music/javascript-S4084.json diff --git a/packages/jsts/src/rules/S6855/cb.fixture.jsx b/packages/jsts/src/rules/S4084/cb.fixture.jsx similarity index 100% rename from packages/jsts/src/rules/S6855/cb.fixture.jsx rename to packages/jsts/src/rules/S4084/cb.fixture.jsx diff --git a/packages/jsts/src/rules/S6855/cb.test.ts b/packages/jsts/src/rules/S4084/cb.test.ts similarity index 97% rename from packages/jsts/src/rules/S6855/cb.test.ts rename to packages/jsts/src/rules/S4084/cb.test.ts index 09f1950fcd0..9507ee2aec0 100644 --- a/packages/jsts/src/rules/S6855/cb.test.ts +++ b/packages/jsts/src/rules/S4084/cb.test.ts @@ -23,6 +23,6 @@ import path from 'path'; const sonarId = path.basename(__dirname); -describe('Rule S6855', () => { +describe('Rule S4084', () => { check(sonarId, rule, __dirname); }); diff --git a/packages/jsts/src/rules/S6855/decorator.ts b/packages/jsts/src/rules/S4084/decorator.ts similarity index 95% rename from packages/jsts/src/rules/S6855/decorator.ts rename to packages/jsts/src/rules/S4084/decorator.ts index 547ff343dda..adb44be7308 100644 --- a/packages/jsts/src/rules/S6855/decorator.ts +++ b/packages/jsts/src/rules/S4084/decorator.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// https://sonarsource.github.io/rspec/#/rspec/S6855/javascript +// https://sonarsource.github.io/rspec/#/rspec/S4084/javascript import { Rule } from 'eslint'; import { Node } from 'estree'; diff --git a/packages/jsts/src/rules/S6855/index.ts b/packages/jsts/src/rules/S4084/index.ts similarity index 100% rename from packages/jsts/src/rules/S6855/index.ts rename to packages/jsts/src/rules/S4084/index.ts diff --git a/packages/jsts/src/rules/index.ts b/packages/jsts/src/rules/index.ts index 66e965899f8..b68a86dba7a 100644 --- a/packages/jsts/src/rules/index.ts +++ b/packages/jsts/src/rules/index.ts @@ -118,7 +118,7 @@ import { rule as S6853 } from './S6853'; // label-has-associated-control import { rule as S1439 } from './S1439'; // label-position import { rule as S5148 } from './S5148'; // link-with-target-blank import { rule as S4622 } from './S4622'; // max-union-size -import { rule as S6855 } from './S6855'; // media-has-caption +import { rule as S4084 } from './S4084'; // media-has-caption import { rule as S1994 } from './S1994'; // misplaced-loop-counter import { rule as S1082 } from './S1082'; // mouse-events-a11y import { rule as S134 } from './S134'; // nested-control-flow @@ -414,7 +414,7 @@ rules['label-has-associated-control'] = S6853; rules['label-position'] = S1439; rules['link-with-target-blank'] = S5148; rules['max-union-size'] = S4622; -rules['media-has-caption'] = S6855; +rules['media-has-caption'] = S4084; rules['misplaced-loop-counter'] = S1994; rules['mouse-events-a11y'] = S1082; rules['nested-control-flow'] = S134; diff --git a/sonar-plugin/javascript-checks/src/main/java/org/sonar/javascript/checks/MediaHasCaptionCheck.java b/sonar-plugin/javascript-checks/src/main/java/org/sonar/javascript/checks/MediaHasCaptionCheck.java index c21fd5d38cf..dff443b312e 100644 --- a/sonar-plugin/javascript-checks/src/main/java/org/sonar/javascript/checks/MediaHasCaptionCheck.java +++ b/sonar-plugin/javascript-checks/src/main/java/org/sonar/javascript/checks/MediaHasCaptionCheck.java @@ -23,10 +23,12 @@ import org.sonar.plugins.javascript.api.EslintBasedCheck; import org.sonar.plugins.javascript.api.JavaScriptRule; import org.sonar.plugins.javascript.api.TypeScriptRule; +import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; @JavaScriptRule @TypeScriptRule -@Rule(key = "S6855") +@DeprecatedRuleKey(ruleKey = "S6855") +@Rule(key = "S4084") public class MediaHasCaptionCheck implements EslintBasedCheck { @Override diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6855.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S4084.html similarity index 100% rename from sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6855.html rename to sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S4084.html diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6855.json b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S4084.json similarity index 96% rename from sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6855.json rename to sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S4084.json index 0e79af60ba4..4bb2283ecc2 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6855.json +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S4084.json @@ -12,7 +12,7 @@ ], "defaultSeverity": "Minor", "ruleSpecification": "RSPEC-6855", - "sqKey": "S6855", + "sqKey": "S4084", "scope": "All", "quickfix": "infeasible", "code": { diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/Sonar_way_profile.json b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/Sonar_way_profile.json index 114c8155df0..874ba2fe973 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/Sonar_way_profile.json +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/Sonar_way_profile.json @@ -327,7 +327,7 @@ "S6852", "S6853", "S6854", - "S6855", + "S4084", "S6859", "S6861", "S6957",