Skip to content

Guard against submitting _spec.* files and READMEs#273

Merged
Tonkpils merged 2 commits intoexercism:masterfrom
daveyarwood:master
Jan 21, 2016
Merged

Guard against submitting _spec.* files and READMEs#273
Tonkpils merged 2 commits intoexercism:masterfrom
daveyarwood:master

Conversation

@daveyarwood
Copy link
Copy Markdown
Contributor

Closes #272.

I see that we allow users to submit test files if they include a --test flag (#189) -- should we do the same to allow submitting READMEs? If so, I propose we change the --test flag to a --force flag and let it apply to READMEs and any other files we may want to complain about in the future.

@Tonkpils
Copy link
Copy Markdown
Contributor

Nope, I don't think we ever want to allow submitting the README. This looks great :)

Tonkpils added a commit that referenced this pull request Jan 21, 2016
Guard against submitting _spec.* files and READMEs
@Tonkpils Tonkpils merged commit 113a259 into exercism:master Jan 21, 2016
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@kytrinyx
Copy link
Copy Markdown
Member

OK cool, I'll add an issue for it.

@kytrinyx
Copy link
Copy Markdown
Member

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.

3 participants