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

Add no sleep cop #1

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Add no sleep cop #1

merged 1 commit into from
Oct 18, 2024

Conversation

oliverguenther
Copy link
Member

No description provided.

Copy link
Member

@cbliard cbliard left a comment

Choose a reason for hiding this comment

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

Nice!

It needs an entry in config/default.yml to be enabled by default.
A basic test would be nice too. I'd be curious to know if that works for code like delay = 2; sleep delay.

lib/rubocop/cop/open_project/no_sleep_in_feature_specs.rb Outdated Show resolved Hide resolved
lib/rubocop/cop/open_project/no_sleep_in_feature_specs.rb Outdated Show resolved Hide resolved
@cbliard cbliard force-pushed the chore/add-no-sleep-cop branch 2 times, most recently from 6d55c22 to c1af7c3 Compare October 18, 2024 10:03
@cbliard cbliard self-requested a review October 18, 2024 10:04
Copy link
Member

@cbliard cbliard left a comment

Choose a reason for hiding this comment

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

👌

@cbliard cbliard force-pushed the chore/add-no-sleep-cop branch from c1af7c3 to 1ac8358 Compare October 18, 2024 10:10
It checks that feature specs do not use `sleep` greater than 1 second.
@cbliard cbliard force-pushed the chore/add-no-sleep-cop branch from 1ac8358 to aa73d24 Compare October 18, 2024 10:11
@cbliard cbliard merged commit 679288d into main Oct 18, 2024
3 checks passed
@cbliard cbliard deleted the chore/add-no-sleep-cop branch October 18, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants