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

feat: automate linter exports #11

Closed
wants to merge 1 commit into from
Closed

feat: automate linter exports #11

wants to merge 1 commit into from

Conversation

barrett-ruth
Copy link
Contributor

automate linter exports. slightly finnicky solution but should work... may be better functions or ways to accomplish the task.

@barrett-ruth
Copy link
Contributor Author

@xiaoshihou514 it looks like the clang tidy diagnostic test here failed. This is because you're trying to compare namespace fields of clang-tidy's diagnostic output:

image

with a guard namespace in the code here, instead of the actual diagnostic namespace.

Currently, the namespace has no relevant info to diagnostics and is thus not capture as part of the diagnostic in the clang-tidy linter code.

Solution:

  1. You (or I) could add it to the regex to satisfy the test, even though the field would just be ignored.
  2. I just delete this line in this commit and we're good.

@xiaoshihou514
Copy link
Collaborator

Currently, the namespace has no relevant info to diagnostics and is thus not capture as part of the diagnostic in the clang-tidy linter code.

That's a neovim namespace used to "tag" stuff. clang-tidy uses from_regex which uses diag_fmt so its namespace should be the Guard namespace. Dunno what happened, will investigate further.

@barrett-ruth
Copy link
Contributor Author

The namespace may not be initialized before the test is run, so the field doesn't show up (nil).

@xiaoshihou514
Copy link
Collaborator

xiaoshihou514 commented Sep 16, 2023

@glepnir 's opinion is just to add an if to guard itself so we don't have to export this. Which does kind of make sense🤔

Tho I think separating formatter.lua and removing linter exports is as pleasant

@xiaoshihou514
Copy link
Collaborator

The namespace may not be initialized before the test is run, so the field doesn't show up (nil).

Will change that after this batch of pr gets merged.

@barrett-ruth barrett-ruth closed this by deleting the head repository Sep 19, 2023
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