Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions apps/oxlint/src/output_formatter/gitlab.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::hash::{DefaultHasher, Hash, Hasher};

use serde::Serialize;

use oxc_diagnostics::{
Error, Severity,
reporter::{DiagnosticReporter, DiagnosticResult, Info},
Expand All @@ -10,19 +12,19 @@ use crate::output_formatter::InternalFormatter;
#[derive(Debug, Default)]
pub struct GitlabOutputFormatter;

#[derive(Debug, serde::Serialize)]
#[derive(Debug, Serialize)]
struct GitlabErrorLocationLinesJson {
begin: usize,
end: usize,
}

#[derive(Debug, serde::Serialize)]
#[derive(Debug, Serialize)]
struct GitlabErrorLocationJson {
path: String,
lines: GitlabErrorLocationLinesJson,
}

#[derive(Debug, serde::Serialize)]
#[derive(Debug, Serialize)]
struct GitlabErrorJson {
description: String,
check_name: String,
Expand Down
10 changes: 5 additions & 5 deletions apps/oxlint/src/output_formatter/json.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use std::cell::RefCell;
use std::rc::Rc;
use std::{cell::RefCell, rc::Rc};

use miette::JSONReportHandler;
use serde::Serialize;

use oxc_diagnostics::{
Error,
reporter::{DiagnosticReporter, DiagnosticResult},
};
use oxc_linter::{RuleCategory, rules::RULES};

use miette::JSONReportHandler;

use crate::output_formatter::InternalFormatter;

#[derive(Debug, Default)]
Expand All @@ -18,7 +18,7 @@ pub struct JsonOutputFormatter {

impl InternalFormatter for JsonOutputFormatter {
fn all_rules(&self) -> Option<String> {
#[derive(Debug, serde::Serialize)]
#[derive(Debug, Serialize)]
struct RuleInfoJson<'a> {
scope: &'a str,
value: &'a str,
Expand Down
Loading