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

pass --output-format instead of --format to ruff #366

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ void createRuffProcess(IExternalCodeAnalysisStream out)
String userArgs = StringUtils.replaceNewLines(
RuffPreferences.getRuffArgs(resource), " ");
List<String> userArgsAsList = new ArrayList<>(Arrays.asList(ProcessUtils.parseArguments(userArgs)));
if (!userArgsAsList.contains("--format=json")) {
userArgsAsList.add("--format=json");
if (!userArgsAsList.contains("--output-format=json")) {
userArgsAsList.add("--output-format=json");
}
// run ruff in project location
IProject project = resource.getProject();
Expand Down Expand Up @@ -272,7 +272,7 @@ public void afterRunProcess(String output, String errors, IExternalCodeAnalysisS
jsonValue = JsonValue.readFrom(output);
} catch (Exception e) {
Log.log(StringUtils.format(
"Expected ruff output to be with json format. i.e.: --format=json.\nFile: %s\nOutput:\n%s",
"Expected ruff output to be with json format. i.e.: --output-format=json.\nFile: %s\nOutput:\n%s",
resource.getFullPath(), output), e);
return;
}
Expand Down Expand Up @@ -466,4 +466,4 @@ public void join() {
}
}
}
}
}
Loading