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

Update metadata for the external rules #4107

Merged
merged 5 commits into from
Aug 28, 2023
Merged

Update metadata for the external rules #4107

merged 5 commits into from
Aug 28, 2023

Conversation

alex-sonar
Copy link
Contributor

Fixes #3126

@alex-sonar alex-sonar marked this pull request as ready for review August 28, 2023 07:53
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a unit test in the following integration test that asserts that we properly import external issues from a couple of ESLint plugins:

class EslintReportTest {
private static final Orchestrator orchestrator = OrchestratorStarter.ORCHESTRATOR;
private static final String PROJECT_KEY_PREFIX = "SonarJS-eslint-report-test";
private static final File PROJECT_DIR = TestUtils.projectDir("eslint_report");
@Test
void should_save_issues_from_external_report_with_relative_paths() {
String projectKey = PROJECT_KEY_PREFIX + "-relative";
SonarScanner build = OrchestratorStarter
.createScanner()
.setProjectDir(PROJECT_DIR)
.setProjectKey(projectKey)
.setProjectName(projectKey)
.setProjectVersion("1.0")
.setSourceDirs("src");

Right now, it seems that we are only testing with ESLint core rules given the content of this report:

[
{
"filePath": "src/file.js",
"messages": [
{
"ruleId": "no-unused-vars",
"severity": 2,
"message": "'addOne' is defined but never used.",
"line": 1,
"column": 10,
"nodeType": "Identifier",

@alex-sonar
Copy link
Contributor Author

Let's add a unit test in the following integration test that asserts that we properly import external issues from a couple of ESLint plugins:

Added @typescript-eslint/eslint-plugin to the report

@sonarqube-next
Copy link

@alex-sonar alex-sonar enabled auto-merge (squash) August 28, 2023 14:10
@alex-sonar alex-sonar merged commit 5730143 into master Aug 28, 2023
16 checks passed
@alex-sonar alex-sonar deleted the issue-3126 branch August 28, 2023 14:18
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.

Add metadata for external rules for Angular and TypeScript
2 participants