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 documentation detailing what rules are for (why are they rules) #80

Open
snowe2010 opened this issue May 29, 2015 · 2 comments
Open
Labels

Comments

@snowe2010
Copy link

Many of these rules seem completely arbitrary. Listing the reasons for them, a source, or some sort of description would help alleviate this feeling. For example, why is there a rule around using a Date?

@vaughncm
Copy link
Collaborator

vaughncm commented Jun 7, 2015

Cuke_sniffer is an opinionated metric system much like any other. Many of the rules we have provided come from conventions outlined at https://github.com/cucumber/cucumber/wiki and some were implemented based on past pain points from our own experiences. You have the ability to manipulate the rules available to you as outlined at https://github.com/r-cochran/cuke_sniffer/wiki/Customizing-Rules. If you have not seen it we also have a list of the rules available on the wiki at https://github.com/r-cochran/cuke_sniffer/wiki/Rules-list.

Much like any metric system cuke_sniffer is not meant to be a system for rigid enforcement but as a series of guidelines that other developers have used in their time using Cucumber. No large Cucumber project will be free of 'violations' as it were. That's also why thresholds were implemented, so that a team may do norming around a set of conventions and continue to follow them.

@vaughncm
Copy link
Collaborator

vaughncm commented Jun 7, 2015

After reviewing the source the 'Date used' rule is an informational violation which is the lowest score. This is in place in the interest of expressiveness in a step definition or scenario. Using dates directly in a scenario would also mean that the test is extremely specific. However, edgecase testing could certainly play into that as a possibility. Rigid dates would mean that at some point the test is going to begin failing or passing with no longer accurate criteria.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants