Skip to content

Conversation

psteinroe
Copy link
Collaborator

@psteinroe psteinroe commented Dec 12, 2024

adds diagnostics

Copied and adapted from Biome. The CLI-related stuff will need some in-depth testing and a number of improvements eg to just handle sql files. I also do not know yet how to define a glob pattern. The std-in mode is also not implemented yet. But the basics are working, and we will figure out the ergonomics later when the linter is implemented.

  • to workspace
  • to lsp
  • to cli via check command

for now just for syntax errors but it will be easily extendable. will add the linter after this.

Screenshot 2024-12-13 at 13 55 09 Screenshot 2024-12-15 at 16 40 13

@psteinroe psteinroe marked this pull request as draft December 12, 2024 09:36
@psteinroe psteinroe marked this pull request as ready for review December 15, 2024 16:04
Copy link
Collaborator

@juleswritescode juleswritescode left a comment

Choose a reason for hiding this comment

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

Very cool :) Great work!!

Mostly Nits except for the coment regarding the Severity 🙌🏻


let errors = diagnostics
.iter()
.filter(|d| d.severity() == Severity::Error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's also Severity::Fatal which would not be included here, should we maybe check d.severity() >= Severity::Error?

impl<'a> JunitReporterVisitor<'a> {
pub(crate) fn new(console: &'a mut dyn Console) -> Self {
let report = Report::new("Biome");
let report = Report::new("PgLsp");
Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screenshot 2024-12-16 at 10 07 45

Copy link
Collaborator

Choose a reason for hiding this comment

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

hahaha

Comment on lines +38 to +39
// pub only: Vec<RuleSelector>,
// pub skip: Vec<RuleSelector>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we remove those?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we need them once the linter is there

psteinroe and others added 4 commits December 16, 2024 09:58
Co-authored-by: Julian Domke <68325451+juleswritescode@users.noreply.github.com>
Co-authored-by: Julian Domke <68325451+juleswritescode@users.noreply.github.com>
Co-authored-by: Julian Domke <68325451+juleswritescode@users.noreply.github.com>
Co-authored-by: Julian Domke <68325451+juleswritescode@users.noreply.github.com>
@psteinroe psteinroe merged commit b2efc18 into main Dec 16, 2024
1 check passed
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.

2 participants