-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FP S4023 (
no-empty-interface
): Ignore when extending external i…
…nterfaces (#4326)
- Loading branch information
1 parent
d05b83c
commit 017476f
Showing
8 changed files
with
46 additions
and
144 deletions.
There are no files selected for viewing
22 changes: 1 addition & 21 deletions
22
its/ruling/src/test/expected/jsts/TypeScript/typescript-S4023.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,9 @@ | ||
{ | ||
"TypeScript:scripts/word2md.ts": [ | ||
57, | ||
60, | ||
67, | ||
81, | ||
99, | ||
112 | ||
], | ||
"TypeScript:src/compiler/types.ts": [ | ||
3161 | ||
99 | ||
], | ||
"TypeScript:src/harness/loggedIO.ts": [ | ||
12 | ||
], | ||
"TypeScript:src/server/protocol.ts": [ | ||
1027, | ||
1101, | ||
1108, | ||
1133, | ||
1210, | ||
1678, | ||
1936, | ||
2223 | ||
], | ||
"TypeScript:src/services/types.ts": [ | ||
366 | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
its/ruling/src/test/expected/jsts/ant-design/typescript-S4023.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 0 additions & 101 deletions
101
its/ruling/src/test/expected/jsts/eigen/typescript-S4023.json
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
its/ruling/src/test/expected/jsts/postgraphql/typescript-S4023.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...avascript-checks/src/test/java/org/sonar/javascript/checks/NoEmptyInterfaceCheckTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* SonarQube JavaScript Plugin | ||
* Copyright (C) 2011-2023 SonarSource SA | ||
* mailto:info AT sonarsource DOT com | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
package org.sonar.javascript.checks; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.google.gson.Gson; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class NoEmptyInterfaceCheckTest { | ||
|
||
@Test | ||
void configurations() { | ||
String configAsString = new Gson().toJson(new NoEmptyInterfaceCheck().configurations()); | ||
assertThat(configAsString).isEqualTo("[{\"allowSingleExtends\":true}]"); | ||
} | ||
} |