Skip to content

feat: linter suppressions #440

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

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

feat: linter suppressions #440

wants to merge 15 commits into from

Conversation

juleswritescode
Copy link
Collaborator

No description provided.

@juleswritescode juleswritescode marked this pull request as draft July 3, 2025 06:36
@@ -570,6 +570,22 @@ impl Workspace for WorkspaceServer {
},
));

let suppressions = parser
.document_suppressions()
.clone()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

todo: maybe we don't need to clone and can instead pull errored suppressions

}

#[derive(Debug, PartialEq, Clone, Eq)]
pub(crate) enum RuleSpecifier {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

todo: add comment

let leading_whitespace_offset = line.len() - start_trimmed.len();
let trimmed = start_trimmed.trim_ascii_end();

assert!(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

todo: add this to function documentation

}

/// Will parse the suppressions at the start of the file.
/// As soon as anything is encountered that's not a `pgt-ignore-all`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

todo: or empty line

let mut eligible = vec![];

// one-for-one, we're checking the lines above a diagnostic location
// until there are no more diagnostics
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
// until there are no more diagnostics
// until there are no more suppressions

}
}

for (line, suppr) in &self.line_suppressions {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

todo: add comment

[package]
authors.workspace = true
categories.workspace = true
description = "<DESCRIPTION>"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add desc?

Copy link
Collaborator Author

@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.

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.

1 participant