Guard against submitting _spec.* files and READMEs#273
Guard against submitting _spec.* files and READMEs#273Tonkpils merged 2 commits intoexercism:masterfrom daveyarwood:master
Conversation
|
Nope, I don't think we ever want to allow submitting the README. This looks great :) |
Guard against submitting _spec.* files and READMEs
There was a problem hiding this comment.
perl doesn't have test or spec in the name, for what it's worth. Languages that have a different pattern for the test files have this defined in the language config, so we could expose it via the API (and perhaps write it to a dotfile somewhere that we can load and check.
There was a problem hiding this comment.
I like that idea, seems much safer.
On Jan 21, 2016 2:37 PM, "Katrina Owen" notifications@github.com wrote:
In cmd/cmd.go
#273 (comment):@@ -17,8 +18,12 @@ func isTest(path string) bool {
file := filepath.Base(path) name := file[:len(file)-len(ext)]
- if name == "test" {
- if name == "test" || name == "spec" {
perl doesn't have test or spec in the name, for what it's worth. Languages
that have a different pattern for the test files have this defined in the
language config, so we could expose it via the API (and perhaps write it to
a dotfile somewhere that we can load and check.—
Reply to this email directly or view it on GitHub
https://github.com/exercism/cli/pull/273/files#r50451141.
|
OK cool, I'll add an issue for it. |
Closes #272.
I see that we allow users to submit test files if they include a
--testflag (#189) -- should we do the same to allow submitting READMEs? If so, I propose we change the--testflag to a--forceflag and let it apply to READMEs and any other files we may want to complain about in the future.