Skip to content

Commit 7d5dfa9

Browse files
JS-1606 Fix/reduce issues (#6836)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent c05c98f commit 7d5dfa9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/analysis/src/css/analysis/metrics.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ export function computeMetrics(root: Root | Document): CssMetrics {
8080
// so line numbers are not necessarily added in order (e.g. a rule's closing
8181
// brace line is added before its children's lines).
8282
return {
83-
ncloc: Array.from(codeLines).sort((a, b) => a - b),
84-
commentLines: Array.from(commentCandidates).sort((a, b) => a - b),
85-
nosonarLines: nosonarLines.sort((a, b) => a - b),
83+
ncloc: Array.from(codeLines).toSorted((a, b) => a - b),
84+
commentLines: Array.from(commentCandidates).toSorted((a, b) => a - b),
85+
nosonarLines: nosonarLines.toSorted((a, b) => a - b),
8686
};
8787
}

packages/analysis/src/jsts/rules/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ If you have any questions, encounter any bugs, or have feature requests, please
138138
| [aws-s3-bucket-public-access](https://sonarsource.github.io/rspec/#/rspec/S6281/javascript) | Allowing public ACLs or policies on a S3 bucket is security-sensitive || | | | |
139139
| [aws-s3-bucket-server-encryption](https://sonarsource.github.io/rspec/#/rspec/S6245/javascript) | Disabling server-side encryption of S3 buckets is security-sensitive | | | | ||
140140
| [aws-s3-bucket-versioning](https://sonarsource.github.io/rspec/#/rspec/S6252/javascript) | Disabling versioning of S3 buckets is security-sensitive || | | | |
141-
| [aws-sagemaker-unencrypted-notebook](https://sonarsource.github.io/rspec/#/rspec/S6319/javascript) | Using unencrypted SageMaker notebook instances is security-sensitive || | | | |
141+
| [aws-sagemaker-unencrypted-notebook](https://sonarsource.github.io/rspec/#/rspec/S6319/javascript) | SageMaker notebook instances should be encrypted at rest || | | | |
142142
| [aws-sns-unencrypted-topics](https://sonarsource.github.io/rspec/#/rspec/S6327/javascript) | Using unencrypted SNS topics is security-sensitive || | | | |
143143
| [aws-sqs-unencrypted-queue](https://sonarsource.github.io/rspec/#/rspec/S6330/javascript) | SQS queues should be encrypted || | | | |
144144
| [bitwise-operators](https://sonarsource.github.io/rspec/#/rspec/S1529/javascript) | Bitwise operators should not be used in boolean contexts || | | 💭 | |
@@ -290,7 +290,7 @@ If you have any questions, encounter any bugs, or have feature requests, please
290290
| [no-redundant-optional](https://sonarsource.github.io/rspec/#/rspec/S4782/javascript) | Optional property declarations should not use both '?' and 'undefined' syntax || | 💡 | 💭 | |
291291
| [no-redundant-parentheses](https://sonarsource.github.io/rspec/#/rspec/S1110/javascript) | Redundant pairs of parentheses should be removed | | | 💡 | ||
292292
| [no-reference-error](https://sonarsource.github.io/rspec/#/rspec/S3827/javascript) | Variables should be defined before being used | | | | | |
293-
| [no-referrer-policy](https://sonarsource.github.io/rspec/#/rspec/S5736/javascript) | Disabling strict HTTP no-referrer policy is security-sensitive || | | | |
293+
| [no-referrer-policy](https://sonarsource.github.io/rspec/#/rspec/S5736/javascript) | HTTP Referrer-Policy should not be set to an unsafe value || | | | |
294294
| [no-regex-spaces](https://sonarsource.github.io/rspec/#/rspec/S6326/javascript) | Regular expressions should not contain multiple spaces || | 💡 | 💭 | |
295295
| [no-require-or-define](https://sonarsource.github.io/rspec/#/rspec/S3533/javascript) | "import" should be used to include external code | | | | 💭 | |
296296
| [no-return-type-any](https://sonarsource.github.io/rspec/#/rspec/S4324/javascript) | Primitive return types should be used | | | | 💭 | |
@@ -359,7 +359,7 @@ If you have any questions, encounter any bugs, or have feature requests, please
359359
| [stable-tests](https://sonarsource.github.io/rspec/#/rspec/S5973/javascript) | Tests should be stable || | | | |
360360
| [standard-input](https://sonarsource.github.io/rspec/#/rspec/S4829/javascript) | Reading the Standard Input is security-sensitive | | | | ||
361361
| [stateful-regex](https://sonarsource.github.io/rspec/#/rspec/S6351/javascript) | Regular expressions with the global flag should be used with caution || | | | |
362-
| [strict-transport-security](https://sonarsource.github.io/rspec/#/rspec/S5739/javascript) | Disabling Strict-Transport-Security policy is security-sensitive || | | | |
362+
| [strict-transport-security](https://sonarsource.github.io/rspec/#/rspec/S5739/javascript) | HTTP Strict-Transport-Security policy should not be disabled || | | | |
363363
| [strings-comparison](https://sonarsource.github.io/rspec/#/rspec/S3003/javascript) | Comparison operators should not be used with strings | | | | 💭 | |
364364
| [table-header](https://sonarsource.github.io/rspec/#/rspec/S5256/javascript) | Tables should have headers || | | | |
365365
| [table-header-reference](https://sonarsource.github.io/rspec/#/rspec/S5260/javascript) | Table cells should reference their headers || | | | |

sonar-plugin/bridge/src/main/java/org/sonar/plugins/javascript/bridge/BridgeServerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void establishWebSocketConnection() {
259259
this.client.connectBlocking();
260260
} catch (InterruptedException e) {
261261
Thread.currentThread().interrupt();
262-
throw new RuntimeException(e);
262+
throw new IllegalStateException("WebSocket connection interrupted", e);
263263
}
264264
}
265265

0 commit comments

Comments
 (0)