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

Fix flycheck-error-level-interesting-p function #1994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benzanol
Copy link

Previously, errors below the minimum severity could get marked as interesting even if errors above the minimum severity existed, as long as no errors which were exactly the minimum severity existed.
This means that if you set your minimum navigation severity to warning, and your file had only errors and hints, navigating would still jump to hints even though they are below the minimum severity.

Previously, errors below the minimum severity could get marked as
interesting even if errors above the minimum severity existed, as long
as no errors which were exactly the minimum severity existed.
@CLAassistant
Copy link

CLAassistant commented Jan 17, 2023

CLA assistant check
All committers have signed the CLA.

@bbatsov
Copy link
Contributor

bbatsov commented Feb 4, 2024

Can you illustrate this with some example, so I can understand better the problem you're trying to fix here?

@benzanol
Copy link
Author

benzanol commented Feb 4, 2024

Can you illustrate this with some example, so I can understand better the problem you're trying to fix here?

Set flycheck-navigation-minimum-level to warning.
Open a file which has errors with level error (more than warning) as well as info (less than warning,) but no warnings.
For example, the following rust code will have an error on 4 and an info on &str:

fn main() {
    let a: &str = 4;
}

flycheck-previous-error and flycheck-next-error will navigate to the info and to the error, when it should just go to the error, because of the minimum navigation level.
This is fixed by the PR.

Hope this helps!

@bbatsov
Copy link
Contributor

bbatsov commented Feb 4, 2024

Got it. I'd suggest adding some spec covering this, if there are already some tests related to the flycheck-navigation-minimum-level behavior, so we won't run into regressions down the road. The change also needs a changelog entry.

@bbatsov
Copy link
Contributor

bbatsov commented Feb 5, 2024

I've also noticed that the older #1870 tackles the same problem, so you can check the solution there as before we proceed. (at a glance it seemed pretty similar to me)

@bbatsov
Copy link
Contributor

bbatsov commented Feb 24, 2024

@benzanol Friendly ping :-)

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.

None yet

3 participants