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

Merged
merged 6 commits into from
Jan 28, 2025
Merged

refactor: rule type #119

merged 6 commits into from
Jan 28, 2025

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.

@notJoon
Copy link
Contributor

notJoon commented Jan 27, 2025

hey, this changes seems good. are you ready for review? or still need some changes?

@0xtekgrinder
Copy link
Contributor Author

hey, this changes seems good. are you ready for review? or still need some changes?

I am ready for a review

Copy link
Contributor

@notJoon notJoon left a comment

Choose a reason for hiding this comment

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

merged. Thanks 👍

@notJoon notJoon merged commit f5c6ef4 into gnoverse:main Jan 28, 2025
3 checks 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.

Finding a Simpler Alternative to LintRule type
2 participants