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

refactor: rule type #119

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

0xtekgrinder
Copy link
Contributor

fixed #92

This PR propose a new simpler implementation of LintRule to create a new rule easier than before.

ps: be harsh with the PR to have some good foundations to build upon

@0xtekgrinder
Copy link
Contributor Author

MMh, in local I don't have problems with the test with race command, do you have any idea on where it could come from and how could I fix it @notJoon ?

@notJoon
Copy link
Contributor

notJoon commented Jan 26, 2025

@0xtekgrinder

It seems a race condition occurred in the captureOutput() function when other tests accessed this output buffer (possibly via fmt.Println?) while replacing the global variable os.Stdout.

The simplest solution would be to remove t.Parallel in the tests calling this capture function to run them sequentially. Alternative approaches include adding a mutex to the capture function or modifying it to use separate Write buffers for each test.

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.

Finding a Simpler Alternative to LintRule type
2 participants